我正在尝试使用gstreamer在RTP上流式传输mpeg2-ts视频。我对服务器使用以下管道:
gst-launch-0.10 -v filesrc location=/home/…/miracast_sample.mpeg ! rtpmp2tpay ! udpsink host=localhost port=5000 sync=false我面临的问题是,我直接获得了如下所述的EOS事件:
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstRTPMP2TPay:rtpmp2tpay0: timestamp = 3878456990
/GstPipeline:pipeline0/GstRTPMP2TPay:rtpmp2tpay0: seqnum = 50764
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 126835285 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...我可以理解它运行得非常快,但是如何修复它呢?
发布于 2013-07-27 14:26:46
您已经设置了sync=FALSE,这就意味着“不要在时间戳上同步,但要尽可能快地处理缓冲区”。尝试将其更改为TRUE,如下所示:
gst-launch-0.10 -v filesrc location=/home/…/miracast_sample.mpeg ! rtpmp2tpay ! udpsink host=localhost port=5000 sync=1发布于 2018-01-19 02:29:23
我遇到了同样的问题,您和我的同事建议我在filesrc和rtpmp2tpay之间插入一个tsparse set-timestamps=true。它对我很有效,所以试着把你的管道改为
gst-launch-0.10 -v filesrc location=/home/…/miracast_sample.mpeg ! \
tsparse set-timestamps=true ! rtpmp2tpay ! udpsink host=localhost port=5000 sync=false发布于 2015-01-14 01:28:57
你有没有试过去复用它然后再复用它..。
例如:
服务器:
gst-launch-0.10 -v filesrc location=file_to_stream.ts ! tsdemux program-number=811 ! mpegtsmux ! rtpmp2tpay ! udpsink host=localhost port=5000 sync=1客户端:
gst-launch-0.10 udpsrc port=5000 caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)MP2T-ES" ! gstrtpbin ! rtpmp2tdepay ! tsdemux ! mpeg2dec ! ffmpegcolorspace ! autovideosinkhttps://stackoverflow.com/questions/17879234
复制相似问题