gpt4 book ai didi

streaming - gstreamer udp流很慢

转载 作者:行者123 更新时间:2023-12-04 06:46:56 25 4
gpt4 key购买 nike

我正在开发视频聊天应用程序,但在UDP流与TCP方面遇到问题。

当我使用下面的管道时,视频流可以接受。 (应用程序本身在python中,但管道本质上如下)

sender: 

gst-launch-0.10 v4l2src ! video/x-raw-yuv,width=320,height=240 !
theoraenc ! oggmux ! tcpclientsink host=nnn.nnn.nnn.nnn port = 5000

receiver:

gst-launch-0.10 tcpserversrc host=nnn.nnn.nnn.nnn port=5000
! decodebin ! xvimagesink

但是,由于此应用程序要跨/通过NAT执行,因此我需要UDP流传输。
当我将tcpserversrc切换为“udpsrc port = 5000”,而将tcpclientsink切换为“udpsink host = nnn.nnn.nnn.nnnn port = 5000”时,性能急剧下降,以至接收计算机每5秒获得一帧或者。 (即使两个流都在同一台计算机上执行,也会发生这种情况)

发送管道生成以下内容(一次):
WARNING: from element /GstPipeline:pipeline0/GstUDPSink:udpsink0: 
Internal data flow problem.
Additional debug info:
gstbasesink.c(3492): gst_base_sink_chain_unlocked (): /GstPipeline:pipeline0
/GstUDPSink:udpsink0:
Received buffer without a new-segment. Assuming timestamps start from 0.

...并且接收管道生成(每20秒左右):
WARNING: from element /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: 
A lot of buffers are being dropped.
Additional debug info:
gstbasesink.c(2739): gst_base_sink_is_too_late (): /GstPipeline:pipeline0
/GstXvImageSink:xvimagesink0:
There may be a timestamping problem, or this computer is too slow.

我读过文档和联机帮助页,上面充斥着udpsink的各种参数,但效果都不佳。
谁能将我引向我完全没有领会的(无疑是显而易见的)事情?
提前致谢 :)

最佳答案

我有同样的问题。
尝试设定

sync=false

在tcpclientsink和xvimagesink上

关于streaming - gstreamer udp流很慢,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6510316/

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