Gstreamer:未协商 RTP 格式

Gstreamer: No RTP format was negotiated

我在使用以下 gstreamer 命令时遇到一些问题

发件人(在嵌入式系统上)

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

接收器(在 windows 上)

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

但是我得到了以下回复

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 ...

投诉似乎是关于传入流不是 rtp 格式,不应将 rtpdepayh264 放置在管道中。当我用 fakesink

替换整个管道时,这个假设被证明是正确的

接收者

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

管道工作。然而,当我观察 wireshark 中的数据包交换时,它显示了通信交换,但协议是 udp。虽然我知道 RTP 可以基于 UDP 协议,但认为 Wireshark 能够显示 RTP

我还以为发件人在发包之前就已经把视频打包成rtp格式了。想知道这里出了什么问题以及如何进行

此致

成功解决问题。未能包含视频流 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