Вопрос

I'm new to gstreamer and can't figure out how to create a working pipeline for the following example. I want to decode a h264 stream from a network camera.

gst-launch rtspsrc location=rtsp://172.16.112.124/axis-media/media.amp  latency=0 ! decodebin ! autovideosink -vvv

This plays fine but i need a self built pipline. Thanks for help!

Setting pipeline to PAUSED ...
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0: latency = 0
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0: buffer-mode = slave (1)
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc0: timeout = 5000000
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc0: buffer-size = 0
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc0: timeout = 0
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)90000, encoding-name=(string)H264, packetization-mode=(string)1, profile-level-id=(string)420029, sprop-parameter-sets=(string)\"Z0IAKeNQKD9gLcBAQGkHiRFQ\\,aM48gA\\=\\=\", a-framerate=(string)30.0, a-transform=(string)\"1\\,0\\,0\\;0\\,1\\,0\\;0\\,0\\,1\", clock-base=(uint)1627931333, seqnum-base=(uint)55492, npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:sink: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)90000, encoding-name=(string)H264, packetization-mode=(string)1, profile-level-id=(string)420029, sprop-parameter-sets=(string)\"Z0IAKeNQKD9gLcBAQGkHiRFQ\\,aM48gA\\=\\=\", a-framerate=(string)30.0, a-transform=(string)\"1\\,0\\,0\\;0\\,1\\,0\\;0\\,0\\,1\", clock-base=(uint)1627931333, seqnum-base=(uint)55492, npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)90000, encoding-name=(string)H264, packetization-mode=(string)1, profile-level-id=(string)420029, sprop-parameter-sets=(string)\"Z0IAKeNQKD9gLcBAQGkHiRFQ\\,aM48gA\\=\\=\", a-framerate=(string)30.0, a-transform=(string)\"1\\,0\\,0\\;0\\,1\\,0\\;0\\,0\\,1\", clock-base=(uint)1627931333, seqnum-base=(uint)55492, npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0.GstGhostPad:recv_rtp_src_0_2308308883_96: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)90000, encoding-name=(string)H264, packetization-mode=(string)1, profile-level-id=(string)420029, sprop-parameter-sets=(string)\"Z0IAKeNQKD9gLcBAQGkHiRFQ\\,aM48gA\\=\\=\", a-framerate=(string)30.0, a-transform=(string)\"1\\,0\\,0\\;0\\,1\\,0\\;0\\,0\\,1\", clock-base=(uint)1627931333, seqnum-base=(uint)55492, npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0.GstGhostPad:recv_rtp_src_0_2308308883_96.GstProxyPad:proxypad6: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)90000, encoding-name=(string)H264, packetization-mode=(string)1, profile-level-id=(string)420029, sprop-parameter-sets=(string)\"Z0IAKeNQKD9gLcBAQGkHiRFQ\\,aM48gA\\=\\=\", a-framerate=(string)30.0, a-transform=(string)\"1\\,0\\,0\\;0\\,1\\,0\\;0\\,0\\,1\", clock-base=(uint)1627931333, seqnum-base=(uint)55492, npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0.GstGhostPad:recv_rtp_src_0_2308308883_96.GstProxyPad:proxypad5: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)90000, encoding-name=(string)H264, packetization-mode=(string)1, profile-level-id=(string)420029, sprop-parameter-sets=(string)\"Z0IAKeNQKD9gLcBAQGkHiRFQ\\,aM48gA\\=\\=\", a-framerate=(string)30.0, a-transform=(string)\"1\\,0\\,0\\;0\\,1\\,0\\;0\\,0\\,1\", clock-base=(uint)1627931333, seqnum-base=(uint)55492, npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)90000, encoding-name=(string)H264, packetization-mode=(string)1, profile-level-id=(string)420029, sprop-parameter-sets=(string)\"Z0IAKeNQKD9gLcBAQGkHiRFQ\\,aM48gA\\=\\=\", a-framerate=(string)30.0, a-transform=(string)\"1\\,0\\,0\\;0\\,1\\,0\\;0\\,0\\,1\", clock-base=(uint)1627931333, seqnum-base=(uint)55492, npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstRtpH264Depay:rtph264depay0.GstPad:src: caps = video/x-h264
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstRtpH264Depay:rtph264depay0.GstPad:sink: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)90000, encoding-name=(string)H264, packetization-mode=(string)1, profile-level-id=(string)420029, sprop-parameter-sets=(string)\"Z0IAKeNQKD9gLcBAQGkHiRFQ\\,aM48gA\\=\\=\", a-framerate=(string)30.0, a-transform=(string)\"1\\,0\\,0\\;0\\,1\\,0\\;0\\,0\\,1\", clock-base=(uint)1627931333, seqnum-base=(uint)55492, npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_h264:ffdec_h2640.GstPad:sink: caps = video/x-h264
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0: caps = video/x-raw-yuv, width=(int)320, height=(int)240, framerate=(fraction)25/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_h264:ffdec_h2640.GstPad:src: caps = video/x-raw-yuv, width=(int)320, height=(int)240, framerate=(fraction)25/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstD3DVideoSink:autovideosink0-actual-sink-d3dvideo.GstPad:sink: caps = video/x-raw-yuv, width=(int)320, height=(int)240, framerate=(fraction)25/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink: caps = video/x-raw-yuv, width=(int)320, height=(int)240, framerate=(fraction)25/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0.GstProxyPad:proxypad7: caps = video/x-raw-yuv, width=(int)320, height=(int)240, framerate=(fraction)25/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink.GstProxyPad:proxypad1: caps = video/x-raw-yuv, width=(int)320, height=(int)240, framerate=(fraction)25/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
WARNING: from element /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstD3DVideoSink:autovideosink0-actual-sink-d3dvideo: A lot of buffers are being dropped.
Additional debug info:
Это было полезно?

Решение

You can find the pipeline created by decodebin and then create it manually.

From gstreamer sdk documentation - basic tutorial 11

GStreamer has the capability to output graph files. These are .dot files, readable with free programs like GraphViz, that describe the topology of your pipeline, along with the caps negotiated in each link.

To obtain .dot files, simply set the GST_DEBUG_DUMP_DOT_DIR environment variable to point to the folder where you want the files to be placed. gst-launch will create a .dot file at each state change, so you can see the evolution of the caps negotiation.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top