3

我正在尝试使用 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 ...

我可以理解它运行得非常快,但是如何解决它?

4

3 回答 3

0

您已设置 sync=FALSE,这意味着“不同步时间戳,但尽可能快地处理缓冲区”。尝试将其更改为 TRUE,如下所示:

gst-launch-0.10 -v filesrc location=/home/…/miracast_sample.mpeg ! rtpmp2tpay ! udpsink host=localhost port=5000 sync=1
于 2013-07-27T06:26:45.960 回答
0

我遇到了同样的问题,你和我的同事建议我tsparse set-timestamps=true在 filesrc 和 rtpmp2tpay 之间插入一个。它对我有用,所以尝试将您的管道更改为

gst-launch-0.10 -v filesrc location=/home/…/miracast_sample.mpeg ! \
  tsparse set-timestamps=true ! rtpmp2tpay ! udpsink host=localhost port=5000 sync=false
于 2018-01-18T18:29:23.030 回答
-1

您是否尝试过对其进行解复用,然后对其进行复用...

如:

服务器:

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 ! autovideosink
于 2015-01-13T17:28:57.393 回答