[英]Gstreamer pipeline stuck in prerolling state when giving only audio to video pipeline
如果我有一个像这样的管道:
gst-launch filesrc location="/home/dk/Music/Vangelis - Alpha.mp3" !
decodebin2 name=dec !
queue ! ffmpegcolorspace ! autovideosink dec. !
queue ! audioconvert ! audioresample ! autoaudiosink
当输入源中没有视频时如何让它播放,但如果有视频则播放视频? 我得到的只是:
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
您可以将autovideosink的async-handling
属性设置为true:
... ! autovideosink async-handling=true
这将允许audiosink在视频链接等待时播放声音。
它是decodebin2的一种bug
看到我测试了一些管道,并了解了以下事项
pipeline1:
gst-launch filesrc location="filename" !
decodebin2 name=dec !
queue ! ffmpegcolorspace ! autovideosink dec. !
queue ! audioconvert ! audioresample ! autoaudiosink
此管道1适用于所有容器格式,如.mkv,.mp4,ogg
但是当你给codec extencion文件然后它会产生你所说的问题
我用.h264文件测试过它
pipeline2:
gst-launch filesrc location="smal.h264" ! decodebin2 name=dec ! queue !
autovideosink dec. ! queue ! autoaudiosink
pipeline3:
gst-launch filesrc location="smal.aac" ! decodebin2 name=dec ! queue !
autovideosink dec. ! queue ! autoaudiosink
所有都有同样的问题他们无法预加载ahaead并且无法显示无效的pad连接错误
如果你只尝试单个有效的pad连接,那么它们工作正常
pipeline4:
gst-launch filesrc location="smal.h264" ! decodebin2 ! autovideosink
pipeline5:
gst-launch filesrc location="smal.aac" ! decodebin2 ! autoaudiosink
管道4和5工作正常
甚至
gst-launch filesrc location="/home/dk/Music/Vangelis - Alpha.mp3" !
decodebin2 ! audioconvert ! audioresample ! autoaudiosink
这也行得正常....
现在更多地了解这个bug并修复它我们需要研究和更改decodebin2源代码.........> !!!!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.