有没有办法制作一个管道来播放任何视频文件(也包含音频)?我尝试过将以下元素链接起来:
filesrc -> decodebin
连同
queue -> audioconvert -> autoaudiosink
及
queue -> autovideoconvert -> autovideosink
这导致两个问题:
queue
链接到autovideoconvert
李>"pad-added"
事件实现pad,特别是当管道同时支持音频和视频时李>我想知道如何做到这一点而不需要gst.parse_launch
。此外,我希望pieline可以使用我抛出的任何格式(如playbin),但不能使用playbin,因为我需要链接其他元素(level
和volume
)
或者,是否有方法将元素(如level
)连接到playbin
我已经构建了一个example video player,它利用了您描述的元素
它应该向您展示如何动态连接焊盘
或者您现在可以使用GStreamer 1.0
您将在那里找到新的属性^{} 和^{} ,它们可用于将元素(如
level)
)连接到playbin通过Python GObject内省,可以很容易地做到这一点:
queue
不是源元素,您需要使用uridecodebin
或decodebin
或类似的元素作为源元素这是一个
gst-launch
格式的示例管道这意味着在管道中有
uridecodebin
-一个解码箱,能够解码与GStreamer兼容的任何源文件,其uri
属性设置为file:///home/joar/Dropbox/Music/04 - Deadmau5 - Clockwork (Jonas Steur Remix).mp3
李>audioconvert
-在不同格式之间转换音频autoaudiosink
如果需要,可以在
uridecodebin
和audioconvert
之间添加queue
元素更新
我可以使用下面的gst启动命令执行您描述的操作
相关问题 更多 >
编程相关推荐