【发布时间】:2011-09-24 12:23:39
【问题描述】:
我正在开发一个视频聊天应用程序,但在使用 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 的各种参数进行了摆弄,但效果不佳。 谁能指导我(毫无疑问是显而易见的)我完全没有得到的东西? 在此先感谢:)
【问题讨论】:
标签: streaming udp video-streaming gstreamer