[英]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.