GStreamer updsrc在连接后不久停止接收数据

GStreamer updsrc在连接后不久停止接收数据,gstreamer,multicasting,Gstreamer,Multicasting,我们正在尝试设置从主机到多个客户端的UDP视频流。当客户机和服务器都在同一台机器上运行时,以及如果两者中的任何一个都在同一台机器上托管的VM中运行时,以下代码可以工作。不管主机还是客户端是Ubuntu 18.04还是MacOS 15.x # server gst-launch-1.0 -v \ avfvideosrc ! \ videoconvert ! \ video/x-raw,format=YUY2 ! \ jpegenc ! \ rtpjpegpay ! \ ud

我们正在尝试设置从主机到多个客户端的UDP视频流。当客户机和服务器都在同一台机器上运行时,以及如果两者中的任何一个都在同一台机器上托管的VM中运行时,以下代码可以工作。不管主机还是客户端是Ubuntu 18.04还是MacOS 15.x

# server
gst-launch-1.0 -v \
  avfvideosrc ! \
  videoconvert ! \
  video/x-raw,format=YUY2 ! \
  jpegenc ! \
  rtpjpegpay ! \
  udpsink host=224.1.1.1 port=5000 auto-multicast=true

# client
gst-launch-1.0 -v \
  udpsrc multicast-group=224.1.1.1 auto-multicast=true port=5000 ! \
  application/x-rtp, encoding-name=JPEG,payload=26 ! \
  rtpjpegdepay ! \
  jpegdec ! \
  video/x-raw ! \
  autovideosink
但是,当客户端在一台计算机上运行,而服务器在同一网络上的另一台物理计算机上运行时,客户端无法向控制台显示任何视频,但以下行除外:

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Got context from element 'autovideosink0-actual-sink-vaapi': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)"\(GstVaapiDisplayGLX\)\ vaapidisplayglx1";
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = application/x-rtp, encoding-name=(string)JPEG, payload=(int)26, media=(string)video, clock-rate=(int)90000
/GstPipeline:pipeline0/GstRtpJPEGDepay:rtpjpegdepay0.GstPad:sink: caps = application/x-rtp, encoding-name=(string)JPEG, payload=(int)26, media=(string)video, clock-rate=(int)90000
/GstPipeline:pipeline0/GstRtpJPEGDepay:rtpjpegdepay0.GstPad:src: caps = image/jpeg, framerate=(fraction)0/1, width=(int)1280, height=(int)720
/GstPipeline:pipeline0/GstJpegDec:jpegdec0.GstPad:sink: caps = image/jpeg, framerate=(fraction)0/1, width=(int)1280, height=(int)720
成功的客户端(实际显示视频的客户端)的控制台输出如下所示:

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Got context from element 'autovideosink0': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\ gldisplayx11-0";
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = application/x-rtp, encoding-name=(string)JPEG, payload=(int)26, media=(string)video, clock-rate=(int)90000
/GstPipeline:pipeline0/GstRtpJPEGDepay:rtpjpegdepay0.GstPad:sink: caps = application/x-rtp, encoding-name=(string)JPEG, payload=(int)26, media=(string)video, clock-rate=(int)90000
/GstPipeline:pipeline0/GstRtpJPEGDepay:rtpjpegdepay0.GstPad:src: caps = image/jpeg, framerate=(fraction)0/1, width=(int)1280, height=(int)720
/GstPipeline:pipeline0/GstJpegDec:jpegdec0.GstPad:sink: caps = image/jpeg, framerate=(fraction)0/1, width=(int)1280, height=(int)720
/GstPipeline:pipeline0/GstJpegDec:jpegdec0.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)1280, height=(int)720, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)1:4:0:0, framerate=(fraction)0/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)1280, height=(int)720, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)1:4:0:0, framerate=(fraction)0/1
...
坏客户端似乎正在接收一些数据(毕竟,它正确地推断了流的功能),但它在jpeg解码器中挂起了。因此,到多播地址的路由似乎是正确的

更令人费解的是,我们已经证明,当在家工作时,这在局域网上有效,但当连接到办公室Wifi时则不起作用。办公室网络的某些配置是否会在初始数量后关闭UDP多播?如果是这样,为什么这不会影响VM(使用桥接网络运行)与其主机之间的流量