gstreamer管道在windows上播放mp4文件

时间:2017-06-27 07:25:04

标签: gstreamer gst-launch

视频文件与下面的管道完美配合。

.\gst-launch-1.0.exe playbin uri=file:///C:\\Users\\naseeb\\Downloads\\Gabbroo.mp4

但是,我想用demux,解码器和接收器自己创建管道。 我创建了下面的管道

.\gst-launch-1.0.exe filesrc location=C:\\Users\\naseeb\\Downloads\\Gabbroo.mp4 ! qtdemux name=demux demux. ! queue ! mad ! audioconvert ! audioresample ! autoaudiosink demux. ! queue ! avdec_h264  ! autovideosink

但它没有工作,但由于下面提到的错误而失败:

  

警告:来自element / GstPipeline:pipeline0 / GstQTDemux:demux:延迟链接>失败。   其他调试信息:   ./grammar.y(506):gst_parse_no_more_pads():/ GstPipeline:pipeline0 / GstQTDemux:demux:   失败延迟将名为demux的GstQTDemux的一个pad连接到名为queue0的GstQueue的某个pad   重新分配延迟......   重新分配延迟......   错误:来自element / GstPipeline:pipeline0 / GstQTDemux:demux:内部数据流错误。   其他调试信息:   qtdemux.c(5850):gst_qtdemux_loop():/ GstPipeline:pipeline0 / GstQTDemux:demux:   流停止,原因未协商(-4)

我搜索了很多,但找不到管道中缺少的元素以使其正常工作。

请提出一些解决方案。

1 个答案:

答案 0 :(得分:1)

  1. 您可能需要在解码器之前使用音频和视频解析器。请尝试mpegaudioparse ! madh264parse ! avdec_h264

  2. 您最有可能在解码器和视频链接之间需要一个视频转换器。试试autovideoconvert ! autovideosink