源码: git clone https://github.com/Five-great/mjpg-streamer.git
安装编译:
$ sudo apt-get install cmake libjpeg8-dev
$ cd ~/mjpg-streamer-master/mjpg-streamer-experimental
$ make
$ sudo make install
测试:
$ mjpg_streamer -i "input_uvc.so -n -f 10 -r 640x480 -d /dev/video0" -o "output_http.so -p 8080 -w /usr/local/share/mjpg-streamer/www"
$ sudo mjpg_streamer -i "input_uvc.so -n -f 10 -r 640x480 -d /dev/video1" -o "output_http.so -p 8080 -w /usr/local/share/mjpg-streamer/www"
MJPG Streamer Version: git rev: 501f6362c5afddcfb41055f97ae484252c85c912
i: Using V4L2 device.: /dev/video1
i: Desired Resolution: 640 x 480
i: Frames Per Second.: 10
i: Format............: JPEG
i: TV-Norm...........: DEFAULT
i: Could not obtain the requested pixelformat: MJPG , driver gave us: YUYV
... will try to handle this by checking against supported formats.
... Falling back to YUV mode (consider using -yuv option). Note that this requires much more CPU power
i: FPS coerced ......: from 10 to 30
o: www-folder-path......: /usr/local/share/mjpg-streamer/www/
o: HTTP TCP port........: 8080
o: HTTP Listen Address..: (null)
o: username:password....: disabled
o: commands.............: enabled
本机测试:
http://localhost:8080/stream.html
远端测试: (其中<devIP>代表设备端的IP)
http://<devIP>:8080/stream.html