完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
在编译之前先安装必要的库
在ubuntu12.04下 $ sudo apt-get install libjpeg8-dev imagemagick libv4l-dev ****************************************************************** 另外: The videodev.h header file that MJPG-Streamer needs has been replaced with a videodev2.h. To make MJPG-Streamer happy you have to create a symbolic link: 做个软链接 $ sudo ln -s /usr/include/linux/videodev2.h /usr/include/linux/videodev.h ************************************************************************** 1 下载mjpeg-streamer mjpg-streamer-code-182.zip r63版本有点老 编译会有很多问题 wget http://sourceforge.net/code-snap ... reamer-code-182.zip 2 修改Makefile CC = ARM-linux-gnueabihf-gcc 3 编译 make USE_LIBV4L2=true clean all 错误: mjpg_streamer.c:27:28: fatal error: linux/videodev.h: No such file or directory compilation terminated. 解决:根据mjpg-streamer的文档,编译需要libjpeg,但是mjpg-streamer的代码依赖是libjpeg7的,我们使用的是libjpeg8,文件名不同,所以要做一个软连接 sudo ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h 3 编译成功会生成相关文件 4 安装 MJPG-Streamer $ sudo make install 输出信息如下: make install install --mode=755 mjpg_streamer /usr/local/bin install --mode=644 input_uvc.so output_file.so output_udp.so output_http.so input_testpicture.so input_file.so /usr/local/lib/ install --mode=755 -d /usr/local/www install --mode=644 -D www/* /usr/local/www 5 启动 camera $ mkdir /tmp/stream $mjpg_streamer -i "/usr/local/lib/input_uvc.so -d /dev/video0 -y -r 320x240 -f 15" -o "/usr/local/lib/output_http.so -p 8090 -w /usr/local/www/" 启动信息如下: *************************************** root@ubuntu:/home/ubuntu/sample/test# mjpg_streamer -i "/usr/local/lib/input_uvc.so -d /dev/video0 -y -r 320x240 -f 15" -o "/usr/local/lib/output_http.so -p 8090 -w /usr/local/www/" MJPG Streamer Version: svn rev: exported i: Using V4L2 device.: /dev/video0 i: Desired Resolution: 320 x 240 i: Frames Per Second.: 15 i: Format............: YUV i: JPEG Quality......: 80 Adding control for Pan (relative) UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device Addi[ 745.514720] uvcvideo: Failed to query (GET_DEF) UVC control 13 on unit 1: -32 (exp. 8). ng control for Tilt (relative) UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device Adding control for Pan Reset UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device Adding control for Tilt Reset UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device Adding control for Pan/tilt Reset UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device Adding control for Focus (absolute) UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device mapping control for Pan (relative) UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device mapping control for Tilt (relative) UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device mapping control for Pan Reset UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device mapping control for Tilt Reset UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device mapping control for Pan/tilt Reset UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device mapping control for Focus (absolute) UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device mapping control for LED1 Mode UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device mapping control for LED1 Frequency UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device mapping control for Disable video processing UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device mapping control for Raw bits per pixel UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device o: www-folder-path...: /usr/local/www/ o: HTTP TCP port.....: 8090 o: username:password.: disabled o: commands..........: enabled *************************************** 6 在浏览器中浏览视频 http://192.168.1.122:8090/ 此时就可以在浏览器中看到视频信息 |
|
相关推荐
4个回答
|
|
duo xie fen xiang, thanks a lot
|
|
|
|
哎哟 不错,挺好的额 比较喜欢 真的很隔离哈哈
|
|
|
|
请问可以用Linux操作系统移植吗?谢谢
|
|
|
|
|
|
|
|
只有小组成员才能发言,加入小组>>
「含关键代码」基于AM3352/AM3354/AM3359的Linux开发案例分享
4891 浏览 0 评论
87405 浏览 0 评论
【高手问答】如何做到精通linux技术?资深工程师带你突破难点
4720 浏览 2 评论
3611 浏览 2 评论
解读Linux :先从创建一个文件夹用来存放jdk压缩文件开始
2478 浏览 0 评论
1995浏览 3评论
1278浏览 1评论
求解:aarch64交叉编译工具已经安装成功,环境变量已经配置,怎么将系统架构切换为ARM的架构
1339浏览 0评论
电脑和虚拟机可以互ping,电脑和开发板也可以互ping,但是虚拟机和开发板ping不通是什么原因
1231浏览 0评论
1172浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-19 11:26 , Processed in 1.132808 second(s), Total 83, Slave 67 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号