无法使用gstreamer将asf流式传输到RTMP

时间:2018-01-24 12:05:52

标签: video gstreamer rtmp asf

我正在使用gstreamer将各种来源流式传输到RTMP。 它适用于RTSPMP4来源,但当我尝试使用asf来源时,它可以正常工作。

我正在使用的管道是:gst-launch-1.0 -v filesrc location="C:\\Users\\user1\\Download s\\Video\\test2.asf" ! asfparse ! asfdemux ! flvmux ! rtmpsink location='rtmp://127.0.0.1:1935/live/test'

我得到的输出是:

Setting pipeline to PAUSED ... Pipeline is PREROLLING ... /GstPipeline:pipeline0/GstAsfParse:asfparse0.GstPad:src: caps = video/x-ms-asf, parsed=(boolean)true /GstPipeline:pipeline0/GstASFDemux:asfdemux0.GstPad:sink: caps = video/x-ms-asf, parsed=(boolean)true /GstPipeline:pipeline0/GstFlvMux:flvmux0: streamable = true /GstPipeline:pipeline0/GstFlvMux:flvmux0.GstPad:src: caps = video/x-flv, streamheader=(buffer)< 464c..., 1200.... > /GstPipeline:pipeline0/GstRTMPSink:rtmpsink0.GstPad:sink: caps = video/x-flv, streamheader=(buffer)< 464c.., 1200... > Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock Got EOS from element "pipeline0". <<<-------- why? Execution ended after 0:00:00.001711787 Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ...

使用playbin可以正常播放文件。

信息流信息:

stream info

如果我更改管道以重新编码视频,则流媒体方面没有错误,但VLC而非gstreamer playbin都无法播放,它们似乎只是永远尝试。< / p>

用于重新编码和流式传输的管道:

gst-launch-1.0 -v filesrc location="C:\\Users\\user1\\Downloads\\Video\ \test2.asf" ! asfparse ! asfdemux ! decodebin ! x264enc ! flvmux ! rtmpsink location='rtmp://127.0.0.1:1935/live/test2'

0 个答案:

没有答案