Search code examples
videogstreamer

Gstreamer: No RTP format was negotiated


I am having some issues with the following gstreamer command

Sender (on embeeded system)

gst-launch-1.0 videotestsrc ! video/x-raw, width=6400, height=480 ! queue ! vpuenc_h264 ! rtph264pay ! udpsink host=192.168.60.5 port=5555

Receiver(on windows)

gst-launch-1.0 udpsrc port=5555 ! queue ! rtph264depay  ! decodebin  ! autovideosink

But I have got the following response

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Got context from element 'autovideosink0': gst.d3d11.device.handle=context, device=(GstD3D11Device)"\(GstD3D11Device\)\ d3d11device4", adapter=(uint)0, device-id=(uint)6429, vendor-id=(uint)32902, hardware=(boolean)true, description=(string)"Intel\(R\)\ HD\ Graphics\ P530";
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0: No RTP format was negotiated.
Additional debug info:
../gst-libs/gst/rtp/gstrtpbasedepayload.c(538): gst_rtp_base_depayload_handle_buffer (): /GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0:
Input buffers need to have RTP caps set on them. This is usually achieved by setting the 'caps' property of the upstream source element (often udpsrc or appsrc), or by putting a capsfilter element before the depayloader and setting the 'caps' property on that. Also see http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/gst/rtp/README
Execution ended after 0:00:00.019641000
Setting pipeline to NULL ...
ERROR: from element /GstPipeline:pipeline0/GstUDPSrc:udpsrc0: Internal data stream error.
Additional debug info:
../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstUDPSrc:udpsrc0:
streaming stopped, reason not-negotiated (-4)
Freeing pipeline ...

The complain seem to be about the incoming stream is not in rtp format and the rtpdepayh264 should not be placed in the pipeline. This assumption is shown to be correct when i replaced the whole pipeline with a fakesink

Receiver

gst-launch-1.0 udpsrc port=5555 ! queue ! fakesink

The pipeline work. However when i observed the packets exchange in wireshark, it show the communication exchange but the protocol is in udp. Though I know that RTP could be based upon UDP protocol but thought that Wireshark is capable of showing RTP

I have thought that the sender has already wrapped the video in rtp format before sending the package out. Like to have some ideas on what is wrong here and how to proceed

Regards


Solution

  • Managed to solve the problem. Have failed to include an identification for the video flow application/x-rtp, encoding-name=H264, payload=96

    gst-launch-1.0 udpsrc port=5555 \
          ! application/x-rtp, encoding-name=H264, payload=96 \
          ! queue \
          ! rtph264depay  \
          ! decodebin  \
          ! autovideosink