树莓派USB摄像头MJPG-Streamer实现网络监控

1、安装依赖库

sudo apt-get install libjpeg62-dev

sudo apt-get install libjpeg8-dev

2、下载mjpg-streamer

wget https://github.com/jacksonliam/mjpg-streamer

或者直接到网站下载zip安装包mjpg-streamer-master.zip

使用unzip mjpg-streamer-master.zip解压

3、编译mjpg-streamer

sudo apt-get install cmake

cd ~/mjpg-streamer-master/mjpg-streamer-experimental

sudo make clean all

4、安装mjpg-streamer

sudo cp mjpg_streamer /usr/local/bin

sudo cp output_http.so input_uvc.so /usr/local/lib/

sudo cp-R www /usr/local/www

5、开启mjpg-streamer

LD_LIBRARY_PATH=/usr/local/lib mjpg_streamer  -i  "input_uvc.so"  -o  "output_http.so  -w  /usr/local/www"

或者LD_LIBRARY_PATH=/usr/local/lib mjpg_streamer -i  "./input_uvc.so  -d  /dev/video0  -r 320*240 -f 12" -o " ./output_http.so–p8090–w/usr/local/www "

6、在浏览器http://树莓派地址:8080,打开监控界面

参考网址:http://blog.sina.com.cn/s/blog_abd39cc70102vrdt.html

你可能感兴趣的:(树莓派USB摄像头MJPG-Streamer实现网络监控)