gpt4 book ai didi

windows - GStreamer 中的 UdpSink 在 Windows 中不工作

转载 作者:可可西里 更新时间:2023-11-01 11:16:01 24 4
gpt4 key购买 nike

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

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 参数有什么问题?

这里面有什么遗漏吗?

最佳答案

在通过 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

关于windows - GStreamer 中的 UdpSink 在 Windows 中不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44826023/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com