OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 3361|回复: 7

使用Gstreamer播放视频和读取摄像头报错

[复制链接]

1

主题

14

帖子

0

精华

初级会员

Rank: 2

积分
67
金钱
67
注册时间
2018-8-29
在线时间
21 小时
发表于 2022-3-6 18:40:57 | 显示全部楼层 |阅读模式
10金钱
使用Gstreamer播放视频:
gst-launch-1.0 playbin uri=file:///media/test_movie.avi 命令,报错的log:
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...

====== AIUR: 4.1.6 build on Jul 20 2021 18:25:04. ======
        Core: AVI_PARSER_03.05.28  build on Oct 10 2016 07:21:58
file: /usr/lib/imx-mm/parser/lib_avi_parser_arm11_elinux.so.3.1
------------------------
    Track 00 [video_0] Enabled
        Duration: 0:00:20.040000000
        Language: und
    Mime:
        video/mpeg, systemstream=(boolean)false, parsed=(boolean)true, mpegversion=(int)4, width=(int)856, height=(int)480, framerate=(fraction)25/1
------------------------
====== IMXV4L2SINK: 4.1.6 build on Jul 20 2021 18:25:41. ======
Caught SIGSEGV
Spinning.  Please run 'gdb gst-launch-1.0 1160' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.

使用gst-play-1.0 file:///media/test_movie.avi 播放视频时报错log:
Press 'k' to see a list of keyboard shortcuts.
Now playing /media/test_movie.avi
Prerolling...
====== AIUR: 4.1.6 build on Jul 20 2021 18:25:04. ======
        Core: AVI_PARSER_03.05.28  build on Oct 10 2016 07:21:58
file: /usr/lib/imx-mm/parser/lib_avi_parser_arm11_elinux.so.3.1
------------------------
    Track 00 [video_0] Enabled
        Duration: 0:00:20.040000000
        Language: und
    Mime:
        video/mpeg, systemstream=(boolean)false, parsed=(boolean)true, mpegversion=(int)4, width=(int)856, height=(int)480, framerate=(fraction)25/1
------------------------
====== IMXV4L2SINK: 4.1.6 build on Jul 20 2021 18:25:41. ======
Segmentation fault

使用命令:gst-launch-1.0 -v imxv4l2src device=/dev/video0 ! "video/x-raw, format=(string)RGB16, width=(int)1024, height=(int)768, framerate=(fraction)30/1" ! imxv4l2sink 报错日志:====== IMXV4L2SRC: 4.1.6 build on Jul 20 2021 18:25:41. ======
====== IMXV4L2SINK: 4.1.6 build on Jul 20 2021 18:25:41. ======
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
Setting pipeline to NULL ...
Freeing pipeline ...
Caught SIGSEGV
Spinning.  Please run 'gdb gst-launch-1.0 1176' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.

使用命令:gst-launch-1.0 -v v4l2src device=/dev/video0 ! "video/x-raw, format=(string)RGB16, width=(int)352, height=(int)288" ! v4l2sink 报错日志:
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ov5640: actual frame rate of XGA is 22.5fps
ov5640: actual frame rate of XGA is 22.5fps
ov5640: actual frame rate of XGA is 22.5fps
ov5640: actual frame rate of XGA is 22.5fps

运行无报错,但lcd没有显示摄像头画面。

文件系统是烧写的是2021-12月发布的出厂文件系统。kernel和设备树是我自己修改编的。请问有谁知道这个报错的原因吗?有的麻烦回复一下,谢谢!!!










正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

1

主题

14

帖子

0

精华

初级会员

Rank: 2

积分
67
金钱
67
注册时间
2018-8-29
在线时间
21 小时
 楼主| 发表于 2022-3-6 18:50:02 | 显示全部楼层
使用 gst-launch-1.0 -v v4l2src device=/dev/video0 ! "video/x-raw, format=(string)RGB16, width=(int)352, height=(int)288" ! v4l2sink运行一会也会报错:
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ov5640: actual frame rate of XGA is 22.5fps
ov5640: actual frame rate of XGA is 22.5fps
ov5640: actual frame rate of XGA is 22.5fps
ov5640: actual frame rate of XGA is 22.5fps
ov5640: actual frame rate of XGA is 22.5fps
ov5640: actual frame rate of XGA is 22.5fps
ov5640: actual frame rate of XGA is 22.5fps
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
Additional debug info:
../../../../gstreamer-1.8.1/libs/gst/base/gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason not-negotiated (-4)
Execution ended after 0:00:34.060043338
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
回复

使用道具 举报

4

主题

2041

帖子

0

精华

资深版主

Rank: 8Rank: 8

积分
5704
金钱
5704
注册时间
2018-10-21
在线时间
1632 小时
发表于 2022-3-7 19:15:58 | 显示全部楼层
摄像头输出配置的分辨率对吗
回复

使用道具 举报

9

主题

776

帖子

0

精华

论坛元老

Rank: 8Rank: 8

积分
5304
金钱
5304
注册时间
2019-9-25
在线时间
438 小时
发表于 2022-3-11 09:31:11 | 显示全部楼层
ov5640需要用出厂内核,你自己的内核 可能没调试好。播放视频 是直接gst-paly-1.0 + 视频文件
回复

使用道具 举报

1

主题

14

帖子

0

精华

初级会员

Rank: 2

积分
67
金钱
67
注册时间
2018-8-29
在线时间
21 小时
 楼主| 发表于 2022-3-11 21:21:44 | 显示全部楼层
茂茂2019 发表于 2022-3-11 09:31
ov5640需要用出厂内核,你自己的内核 可能没调试好。播放视频 是直接gst-paly-1.0 + 视频文件

感谢回复,
回复

使用道具 举报

1

主题

14

帖子

0

精华

初级会员

Rank: 2

积分
67
金钱
67
注册时间
2018-8-29
在线时间
21 小时
 楼主| 发表于 2022-3-11 21:25:21 | 显示全部楼层
茂茂2019 发表于 2022-3-11 09:31
ov5640需要用出厂内核,你自己的内核 可能没调试好。播放视频 是直接gst-paly-1.0 + 视频文件

感谢回复
1.内核配置已经加过对ov5640的支持了,driver/media下的源码也是替换了最新发布的内核源码,设备也已经识别到了,就是使用命令播放失败,log也暂时看不出问题点。
2.目前播放视频是用的gst-player-1.0+文件名,不过只有声音,lcd没有显示视频,感觉和解码有关
回复

使用道具 举报

1

主题

14

帖子

0

精华

初级会员

Rank: 2

积分
67
金钱
67
注册时间
2018-8-29
在线时间
21 小时
 楼主| 发表于 2022-3-11 21:30:10 | 显示全部楼层
QinQZ 发表于 2022-3-7 19:15
摄像头输出配置的分辨率对吗

上边那个命令中有设置输出的大小和格式, width=(int)1024, height=(int)768, 这个大小ov5640也支持该分辨率。
回复

使用道具 举报

9

主题

776

帖子

0

精华

论坛元老

Rank: 8Rank: 8

积分
5304
金钱
5304
注册时间
2019-9-25
在线时间
438 小时
发表于 2022-3-14 09:49:05 | 显示全部楼层
zbtzbt 发表于 2022-3-11 21:25
感谢回复
1.内核配置已经加过对ov5640的支持了,driver/media下的源码也是替换了最新发布的内核源码,设 ...

是不是你的lcd没起来,没驱动起来?
想思考的时候,有时还可以用屁股,QQ 1252699831
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2025-2-24 03:17

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

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