(from http://lilnetwork.com/download/raspberrypi/mjpg-streamer.tar.gz)
sudo apt-get update
sudo apt-get install libv4l-dev libjpeg8-dev subversion imagemagick
sudo ln -s /usr/include/linux/videodev2.h /usr/include/linux/videodev.h
svn co https://svn.code.sf.net/p/mjpg-streamer/code/mjpg-streamer/ mjpg-streamer
cd mjpg-streamer/
make USE_LIBV4L2=true clean all
sudo make DESTDIR=/usr install
sudo cp mjpg_streamer /usr/local/bin
sudo cp -R www /usr/local/www
mjpg_streamer -i «/usr/lib/input_uvc.so -d /dev/video0 -y -r 1280×720 -q 95 -f 4 -l auto» -o «/usr/lib/output_http.so -p 8080 -w /usr/local/www -c user:id»
Не забываем про кривое отображение кавычек и «Х»
sudo mcedit /etc/init.d/mjpg_streamkick
#! /bin/sh
# /etc/init.d/mjpg_streamkick
# Carry out specific functions when asked to by the system
case «$1» in
start)
echo «Starting mjpg_streamkick script»
export LD_LIBRARY_PATH=/usr/local/bin
mjpg_streamer -i «/usr/lib/input_uvc.so -d /dev/video0 -y -r 1280×720 -q 95 -f 4 -l auto» -o «/usr/lib/output_http.so -p 8080 -w /usr/local/www -c user:id» &
;;
stop)
echo «Stopping webcam script»
killall mjpg_streamer
;;
*)
echo «Usage: /etc/init.d/mjpg_streamkick {start|stop}»
exit 1
;;
esac
exit 0
sudo chmod 755 /etc/init.d/mjpg_streamkick
sudo update-rc.d mjpg_streamkick defaults
mjpg_streamer -i /usr/lib/input_uvc.so -d /dev/video0 -y -r 716×537 -q 90 -f 24 -l auto -o /usr/lib/output_http.so -p 8080 -w /usr/local/www -c usr:pwd
by danjperron
https://www.raspberrypi.org/forums/viewtopic.php?t=48597