天嵌 ARM开发社区

 找回密码
 注册
查看: 7073|回复: 5

MJPG-streamer Segmentation fault

[复制链接]
漂洋过海 发表于 2012-3-26 00:09:24 | 显示全部楼层 |阅读模式
mjpg_streamer -i "/lib/input_uvc.so" -o "/lib/output_http.so -w 192.168.40.5
9:8080"
MJPG-streamer [872]: starting application
MJPG Streamer Version.: 2.0
MJPG-streamer [872]: MJPG Streamer Version.: 2.0

i: Using V4L2 device.: /dev/video0
MJPG-streamer [872]: Using V4L2 device.: /dev/video0

i: Desired Resolution: 640 x 480
MJPG-streamer [872]: Desired Resolution: 640 x 480

i: Frames Per Second.: 5
MJPG-streamer [872]: Frames Per Second.: 5

i: Format............: MJPEG
MJPG-streamer [872]: Format............: MJPEG

o: www-folder-path...: 192.168.40.59:8080/
MJPG-streamer [872]: www-folder-path...: 192.168.40.59:8080/

o: HTTP TCP port.....: 8080
MJPG-streamer [872]: HTTP TCP port.....: 8080

o: username:password.: disabled
MJPG-streamer [872]: username:password.: disabled

o: commands..........: enabled
MJPG-streamer [872]: commands..........: enabled

MJPG-streamer [872]: starting input plugin
Segmentation fault
libjpeg库和SDL库都齐全,一直搞不懂是什么原因
 楼主| 漂洋过海 发表于 2012-3-26 12:41:05 | 显示全部楼层
这个问题我已经找到解决方法,像其他普通的input-plugin一样,input plugin是把JPEG格式的图片拷贝到全局可访问内存中,接着给等待进程发送信号,由于拷贝到的内存越界,导致段错误。解决方法:在linux bootoption中加上mem=64M,限制内存区,就不会越界了。就这么一个小错误,困扰了几天,曾今想放弃了
TQ-lkp 发表于 2012-3-26 13:24:42 | 显示全部楼层
楼主威武!
_hxlt 发表于 2012-8-21 22:37:54 | 显示全部楼层
"在linux bootoption中加上mem=64M,限制内存区,就不会越界了"    LZ这个可以详细点吗     我没有设置过bootoption    可是遇到类似的问题
[root@EmbedSky /]# mjpg_streamer -i "/lib/WebCam/input_cmoscamera.so -r 320x256"
-o "/lib/WebCam/output_http.so -w 192.168.1.122:8080"
MJPG-streamer [483]: starting application
MJPG Streamer Version: svn rev: exported
MJPG-streamer [483]: MJPG Streamer Version: svn rev: exported

i: Using CMOS Camera device.: /dev/camera
MJPG-streamer [483]: Using CMOS Camera device.: /dev/camera

i: Desired Resolution: 640 x 512
MJPG-streamer [483]: Desired Resolution: 640 x 512

i: Frames Per Second.: 5
MJPG-streamer [483]: Frames Per Second.: 5

i: Format............: YUV
MJPG-streamer [483]: Format............: YUV

i: JPEG Quality......: 80
MJPG-streamer [483]: JPEG Quality......: 80

o: www-folder-path...: 192.168.1.122:8080/
MJPG-streamer [483]: www-folder-path...: 192.168.1.122:8080/

o: HTTP TCP port.....: 8080
MJPG-streamer [483]: HTTP TCP port.....: 8080

o: username:password.: disabled
MJPG-streamer [483]: username:password.: disabled

o: commands..........: enabled
MJPG-streamer [483]: commands..........: enabled

MJPG-streamer [483]: starting input plugin /lib/WebCam/input_cmoscamera.so
i: cleaning up ressources allocated by input thread
MJPG-streamer [483]: cleaning up ressources allocated by input thread

Segmentation fault
embedsky_lhh 发表于 2012-8-22 16:03:43 | 显示全部楼层
把www拷贝到根目录,然后
执行mjpg_streamer -i "/lib/WebCam/input_cmoscamera.so -r 320x256"  -o "/lib/WebCam/output_http.so -w /www"
就可以了,不过有些浏览器不行,
注意USB摄像头是执行mjpg_streamer -i "/lib/WebCam/input_uvc.so" -o "/lib/WebCam/output_http.so -w  /www "
在PC的浏览器中http://192.168.1.98:8080/javascript.html 或者http://192.168.1.98:8080/java.html或者http://192.168.1.98:8080/stream.html 即可以看监控内容
以上内容摘自笔者实验环境,不同的环境请做适当的修改,如IP或者mjpg_streamer后面的参数请按照当时的环境为准
_hxlt 发表于 2012-8-22 21:11:04 | 显示全部楼层
谢谢LS的版主   原来的问题解决了  是由于SDL库不匹配引起的
用浏览器的话,不知道为什么只能静态的图片,需要刷新,不能视频流
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号 )

GMT+8, 2024-4-20 02:04 , Processed in 1.046875 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表