Gstreamer - 使用TCP源流式传输

时间:2015-07-19 12:43:19

标签: gstreamer

我正在尝试使用TCP流式传输视频。以下是服务器管道:

gst-launch filesrc location=<movie>.mkv ! decodebin ! ffenc_mpeg4 bitrate=5000000 ! rtpmp4vpay mtu=1400 pt=96 ssrc=0 timestamp-offset=0 seqnum-offset=0 send-config=true ! tcpserversink host=0.0.0.0 port=5000

客户端管道是:

gst-launch tcpclientsrc host=192.168.1.93 port=5000 ! capsfilter caps="application/x-rtp, media=(string)video, clock-rate=(int)2147483647, encoding-name=(string)MP4V-ES, profile-level-id=(string)1, config=(string)000001b001000001b58913000001000000012000c48d88007d0a041e1463000001b24c61766335322e3132332e30, payload=(int)96, ssrc=(uint)298758266, clock-base=(uint)3097828288, seqnum-base=(uint)63478" ! rtpmp4vdepay ! ffdec_mpeg4 ! autovideosink

我必须在tcpclientsrc和rtpmp4vdepay之间加入一个capsfilter。但是,如果我使用udpsrc,似乎并不需要这样做。 (我似乎无法通过我的BT路由器获得基于多播的流式传输)。启动时,客户端开始播放视频,但它很垃圾,我可以在客户端看到以下警告。

WARNING: from element /GstPipeline:pipeline0/GstRtpMP4VDepay:rtpmp4vdepay0: Could not decode stream.
Additional debug info:
gstbasertpdepayload.c(387): gst_base_rtp_depayload_chain (): /GstPipeline:pipeline0/GstRtpMP4VDepay:rtpmp4vdepay0:
Received invalid RTP payload, dropping

此警告会持续发出。

我在这里做错了什么?

0 个答案:

没有答案