0

我正在玩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.

流信息:

流信息

如果我更改管道以重新编码视频,则流媒体端没有错误,但两者都VLC无法gstreamer playbin播放,他们似乎只是永远尝试。

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

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'

4

0 回答 0