使用GStreamer通过RTSP提供RTP流

时间:2014-06-10 01:52:50

标签: linux gstreamer rtsp rtp

我有一个来自HW编码器的RTP流,我想使用Gstreamer 0.10向RTSP客户端提供服务。使用" test-video.c"作为一个起点我能够为videotestsrc提供服务,但是没有任何运气服务于传入的RTP流。我按如下方式修改了管道。

gst_rtsp_media_factory_set_launch (factory, "(gstrtpbin name=rtpbin latency=200 udpsrc caps=\"application/x-rtp, media=video, clock-rate=90000, encoding-name=MP2T-ES, payload=33\" port=5000 ! rtpbin.recv_rtp_sink_0 rtpbin. ! queue name=pay0 "

但它不起作用。我猜它与没有正确携带的帽子有关。

尝试播放时,我在服务器上收到以下消息

0:00:02.582382334  4325    0x12458 WARN                bin gstbin.c:2399:gst_bin_do_latency_func:<media-pipeline> failed to query latency
0:00:02.786215669  4325 0x2bf03a40 WARN                basesink gstbasesink.c:3638:gst_base_sink_chain_unlocked:<multiudpsink0> warning: Internal data flow problem.
0:00:02.786330002  4325 0x2bf03a40 WARN                basesink gstbasesink.c:3638:gst_base_sink_chain_unlocked:<multiudpsink0> warning: Received buffer without a new-segment. Assuming timestamps start from 0.
0:00:02.786540668  4325   0x13cde0 WARN                rtspmedia rtsp-media.c:1511:default_handle_message: 0x1200b0: got warning Internal data flow problem. (gstbasesink.c(3638): gst_base_sink_chain_unlocked (): /GstPipeline:media-pipeline/GstMultiUDPSink:multiudpsink0: Received buffer without a new-segment. Assuming timestamps start from 0.)
0:00:02.787497335  4325   0x189238 WARN                     bin gstbin.c:2395:gst_bin_do_latency_func:<media-pipeline> did not really configure latency of 0:00:00.200000000
0:00:02.816800002  4325    0x12458 WARN              rtspclient rtsp-client.c:782:handle_play_request: RTP-Info cannot be determined for stream 0
0:00:02.818120668  4325    0x12458 WARN                     bin gstbin.c:2395:gst_bin_do_latency_func:<media-pipeline> did not really configure latency of 0:00:00.200000000

&#34;内部数据流问题&#34;不是一个有希望的迹象。输入流是MPEG2传输流内的H.264视频。关于如何解决这个问题的任何想法?

谢谢,

/奥托

1 个答案:

答案 0 :(得分:0)

您可能需要一个mpegtsdemux元素(在gstreamer坏插件中)来解复用MPEG2TS的视频流。