GStreamer中的UdpSink无法在Windows中运行

时间:2017-06-29 13:06:20

标签: windows video-streaming gstreamer rtp

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

  

gst-launch-1.0 videotestsrc! udpsink port = 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.

GStreamer参数有什么问题?

那里有什么遗漏吗?

1 个答案:

答案 0 :(得分:3)

在UDP上传输视频之前,您需要先加载费用。

 gst-launch-1.0 videotestsrc ! rtpraw4vpay ! udpsink port=5200

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

gst-launch-1.0 videotestsrc ! x264enc ! video/x-h264, stream-format=byte-stream ! rtph264pay ! udpsink port=5200

您将收到此流

gst-launch-1.0 udpsrc port=5200 ! application/x-rtp, encoding-name=H264, payload=96 ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink