2016-05-13 42 views
2

我想通过udp流.ts文件,因为我使用了下面的管道。Streaming .ts通过UDP文件

但在一秒钟内它到达EOS

GST_DEBUG=3 gst-launch-1.0 -v filesrc location=avm.ts ! queue ! tsparse ! rtpmp2tpay ! udpsink host=192.168.1.139 port=8080 

Setting pipeline to PLAYING ... 
New clock: GstSystemClock 
Got EOS from element "pipeline0". 
Execution ended after 0:00:00.177011430 

在接收端我不能够接受完整的数据,只有前几帧在发送端,因为即时退出来了。

同时流式传输一个.ts文件,其中包含视频&文本数据,在接收端只能获取文本数据。

在调试消息的下方发送结束。

0:00:00.030345526 7863  0xd9df60 WARN     basesrc gstbasesrc.c:3483:gst_base_src_start_complete:<filesrc0> pad not activated yet 
Pipeline is PREROLLING ... 
/GstPipeline:pipeline0/MpegTsMux:mpegtsmux0.GstPad:sink_65: caps = "application/x-metadata\,\ standard\=\(string\)klv" 
0:00:00.031289005 7863  0xd710f0 FIXME    basesink gstbasesink.c:3064:gst_base_sink_default_event:<udpsink0> stream-start event without group-id. Consider implementing group-id handling in the upstream elements 

当我改变了管道,并添加身份一样,

gst-launch-1.0 filesrc location=vfpd.ts ! queue ! tsparse ! rtpmp2tpay ! identity silent=false ! udpsink -v host=192.168.1.139 port=8765 

然后收到太多邮件,就像下面,

/GstPipeline:pipeline0/GstIdentity:identity0: last-message = chain ******* (identity0:sink) (1328 bytes, dts: none, pts:none, duration: none, offset: -1, offset_end: -1, flags: 00004000 tag-memory) 0x7fcaf40abac0 
/GstPipeline:pipeline0/GstIdentity:identity0: last-message = chain ******* (identity0:sink) (200 bytes, dts: none, pts:none, duration: none, offset: -1, offset_end: -1, flags: 00004000 tag-memory) 0x7fcaf40abdf0 
/GstPipeline:pipeline0/GstIdentity:identity0: last-message = chain ******* (identity0:sink) (1328 bytes, dts: none, pts:none, duration: none, offset: -1, offset_end: -1, flags: 00004000 tag-memory) 0x7fcaf40db7f0 
/GstPipeline:pipeline0/GstIdentity:identity0: last-message = chain ******* (identity0:sink) (1328 bytes, dts: none, pts:none, duration: none, offset: -1, offset_end: -1, flags: 00004000 tag-memory) 0x7fcaf409d450 
/GstPipeline:pipeline0/GstIdentity:identity0: last-message = chain ******* (identity0:sink) (1328 bytes, dts: none, pts:none, duration: none, offset: -1, offset_end: -1, flags: 00004000 tag-memory) 0x7fcaf4007460 
/GstPipeline:pipeline0/GstIdentity:identity0: last-message = chain ******* (identity0:sink) (200 bytes, dts: none, pts:none, duration: none, offset: -1, offset_end: -1, flags: 00004000 tag-memory) 0x7fcaf40bfc10 
/GstPipeline:pipeline0/GstIdentity:identity0: last-message = chain ******* (identity0:sink) (1328 bytes, dts: none, pts:none, duration: none, offset: -1, offset_end: -1, flags: 00004000 tag-memory) 0x7fcaf408f000 
/GstPipeline:pipeline0/GstIdentity:identity0: last-message = chain ******* (identity0:sink) (1328 bytes, dts: none, pts:none, duration: none, offset: -1, offset_end: -1, flags: 00004000 tag-memory) 0x7fcaf409d560 
/GstPipeline:pipeline0/GstIdentity:identity0: last-message = chain ******* (identity0:sink) (952 bytes, dts: none, pts:none, duration: none, offset: -1, offset_end: -1, flags: 00004000 tag-memory) 0x7fcaf408f330 
/GstPipeline:pipeline0/GstIdentity:identity0: last-message = event ******* (identity0:sink) E (type: eos (28174),) 0x7fcaf4003400 

所以,我的理解,它是在单个实例中发送所有数据包,这意味着无需流量控制。

该文件是25帧/秒。而且我怎样才能以相同的流量输出ts?

那个警告是什么意思?以及如何解决它? 如何解决此问题?我怎样才能减慢流量?

+0

与同步参数可能起于沉.. – nayana

+0

不给任何改善,没有发生任何变化 –

+0

然后检查日志,发现一些有趣的东西,把它放在这里 – nayana

回答

0

我已经使用下面的管道,这解决了我的问题。

GST_DEBUG=3 gst-launch-1.0 -v filesrc location=avm.ts ! queue ! tsdemux ! mpegtsmux ! rtpmp2tpay ! udpsink host=192.168.1.139 port=8080 
+0

不要忘记接受它作为正确的答案(灰色勾选下面的答案分数) – nayana

1

首先 - 管道看起来不错,我..

从您的更新:

那么它看起来像我预期它会在一个突发(因为你已经说过),问题在你原来的流中,帧内没有时间信息(那些对于dts,pts和持续时间没有时间信息)..有两种可能的解释 - 你的.ts文件存在一些问题..或者gstreamer管道中存在问题..

个性我认为你的.ts文件错误..

为了消除第一个我会建议分析的.ts一些MPEG analyzato​​r文件..

你应该检查MPEG TS流不包含正确PCR值是同步mpeg流的信息。

UPDATE:

确定后黑客,我发现这个解决方案的一点,我希望它工作在reciever网站,我测试只是流它,它运行原ts file长度:

gst-launch-1.0 filesrc location=football.ts ! queue ! tsparse set-timestamps=true ! rtpmp2tpay ! udpsink -v host=192.168.1.139 port=8765 

set-timestamps正确标记具有时间信息的缓冲区。

+0

如果.TS文件是错误的,那么它为什么通过使用playbin播放得很好。即使当我使用这个管道时,gst-launch-1.0 filesrc location = vfpd.ts! tsdemux! h264parse! avdec_h264! videoconvert! xvimagesink。 –

+0

我确信ts文件已经很好地创建了,并且它的解码能力很好 –

+0

如果你在tsdemux之后放置标识会发生什么?也许有tsparse – nayana