gstreamer正确管道将rtsp流解码为原始视频

时间:2016-11-17 17:48:13

标签: gstreamer

使用gstreamer-1.10我一直尝试使用多个版本的管道来解码以webrtc连接方式启动的RTSP流。

ffprobe报告流为

Duration: N/A, start: 0.128000, bitrate: N/A
Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp
Stream #0:1: Video: h264 (Constrained Baseline), yuv420p, 512x288 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 90k tbn, 60 tbc

使用以下管道的变体

GST_DEBUG=3 gst-launch-1.0  -e rtspsrc location=rtsp://xxx.xxx.xxx.xxx:1935/alpha/Stream1  \
! decodebin name=decode \
decode. \
! x264enc bitrate=512 speed-preset=6 \
! video/x-h264, profile=baseline  \
! queue ! mp4mux name=mp4mux ! filesink location=file.mp4 \
decode. ! avenc_aac bitrate=96000 ! aacparse ! queue  ! mp4mux.

我收到以下错误

0:00:00.299416405  7705 0x7f0d48001e80 WARN                 default grammar.y:510:gst_parse_no_more_pads:<decode> warning: Delayed linking failed.
0:00:00.299435518  7705 0x7f0d48001e80 WARN                 default grammar.y:510:gst_parse_no_more_pads:<decode> warning: failed delayed linking some pad of GstDecodeBin named decode to some pad of GstX264Enc named x264enc0
WARNING: from element /GstPipeline:pipeline0/GstDecodeBin:decode: Delayed linking failed.
Additional debug info:
./grammar.y(510): gst_parse_no_more_pads (): /GstPipeline:pipeline0/GstDecodeBin:decode:
failed delayed linking some pad of GstDecodeBin named decode to some pad of GstX264Enc named x264enc0
0:00:01.296295371  7705 0x7f0d6402a8f0 WARN                 basesrc gstbasesrc.c:2951:gst_base_src_loop:<udpsrc3> error: Internal data stream error.
0:00:01.296324999  7705 0x7f0d6402a8f0 WARN                 basesrc gstbasesrc.c:2951:gst_base_src_loop:<udpsrc3> error: streaming stopped, reason not-linked (-1)

解码此流的正确管道是什么?

0 个答案:

没有答案