GStreamer 中的 UdpSink 在 Windows 中不起作用

Jog*_*rge 3 windows rtp video-streaming gstreamer

我是 GSTreamer 的新手。我尝试使用 GStreamer 上传视频。在运行以下命令时,

gst-launch-1.0 videotestsrc !udpsink 端口=5200

我收到如下警告。

WARNING: from element /GstPipeline:pipeline0/GstUDPSink:udpsink0: Attempting to send a UDP packets larger than maximum size (115200 > 65507)
Additional debug info:
gstmultiudpsink.c(715): gst_multiudpsink_send_messages (): /GstPipeline:pipeline0/GstUDPSink:udpsink0:
Reason: Error sending message: A message sent on a datagram socket was larger than the internal message buffer or some other network limit, or the buffer used to receive a datagram into was smaller than the datagram itself.
0:00:56.934530706  4912 0000000002F09640 WARN            multiudpsink gstmultiudpsink.c:715:gst_multiudpsink_send_messages:<udpsink0> warning: Attempting to send a UDP packets larger than maximum size (115200 > 65507)
0:00:56.939093412  4912 0000000002F09640 WARN            multiudpsink gstmultiudpsink.c:715:gst_multiudpsink_send_messages:<udpsink0> warning: Reason: Error sending message: A message sent on a datagram socket was larger than the internal message buffer or some other network limit, or the buffer used to receive a datagram into was smaller than the datagram itself.
Run Code Online (Sandbox Code Playgroud)

GStreamer 参数有什么问题?

这里面有什么遗漏吗?

Alp*_*ler 6

在 UDP 上传输视频之前,您需要先进行有效负载。

 gst-launch-1.0 videotestsrc ! rtpraw4vpay ! udpsink port=5200
Run Code Online (Sandbox Code Playgroud)

但是通过 udp 传输原始视频不是首选。传输视频的更好方法是对其进行编码以减小尺寸。我更喜欢 h264 编码以获得最佳尺寸。

gst-launch-1.0 videotestsrc ! x264enc ! video/x-h264, stream-format=byte-stream ! rtph264pay ! udpsink port=5200
Run Code Online (Sandbox Code Playgroud)

您将收到此流

gst-launch-1.0 udpsrc port=5200 ! application/x-rtp, encoding-name=H264, payload=96 ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink
Run Code Online (Sandbox Code Playgroud)

  • 我正在尝试你的最后两个命令,但没有任何反应。没有错误,只是两侧都有“新时钟:GstSystemClock”。 (3认同)