How To Install Mjpg-Streamer

https://www.raspberrypi.org/forums/viewtopic.php?t=48597

lsusb
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libjpeg8-dev imagemagick libv4l-dev
sudo ln -s /usr/include/linux/videodev2.h /usr/include/linux/videodev.h
sudo apt-get install subversion
cd ~
svn co https://svn.code.sf.net/p/mjpg-streamer/code/mjpg-streamer/ mjpg-streamer
cd mjpg-streamer
make mjpg_streamer input_file.so input_uvc.so output_http.so
sudo cp mjpg_streamer /usr/local/bin
sudo cp output_http.so input_file.so input_uvc.so /usr/local/lib/
sudo cp -R www /usr/local/www
sudo vi ~/.bashrc
export LD_LIBRARY_PATH=/usr/local/lib/
source ~/.bashrc
/usr/local/bin/mjpg_streamer -i “input_file.so -f /tmp/stream -n pic.jpg”-o “output_http.so -w /usr/local/www”
sudo vi /usr/sbin/livestream.sh
#!/bin/bash
/usr/local/bin/mjpg_streamer -i “/usr/local/lib/input_uvc.so” -o “/usr/local/lib/output_http.so -w /var/www/stream -c username:password”
sudo chmod 755 /etc/init.d/livestream.sh
sudo update-rc.d livestream.sh defaults

Viet Luu has written 143 articles

Leave a Reply