2

I'm trying to stream a video that has been processed by OpenCV using GStreamer over UDP from a RPi4 (Ubuntu 20.04 LTS 64bit without any GUI) to a PC (Ubuntu 18.04).

I'm sharing Wifi connection to the RPi by ethernet (PC address : 10.42.0.1 and RPi address : 10.42.0.18). It worked using TCP with the following sender pipeline:

appsrc !  videoconvert !  x264enc tune=zerolatency speed-preset=ultrafast !  rtph264pay config-interval=10 pt=96 !  mpegtsmux !  tcpserversink host=10.42.0.18 port=6969

But I can't get it to work using UDP with this pipeline :

appsrc !  videoconvert !  x264enc tune=zerolatency speed-preset=ultrafast !  rtph264pay config-interval=10 pt=96 !  udpsink host=10.42.0.1 port=6969

By analyzing my network, I can see that the RPi is sending the data over ethernet so I think the problem come from my receiver pipeline which is this one :

gst-launch-1.0 -v -e udpsrc port=6969 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, format=BGR, payload=(int)96" ! rtph264depay ! avdec_h264 lowres=1 ! videoconvert ! autovideosink

When I run it, nothing append, it just waits. But by sniffing my 6969 port on my PC I can see the data coming:

tcpdump -n udp port 6969
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on enp3s0, link-type EN10MB (Ethernet), capture size 262144 bytes
07:05:13.758524 IP 10.42.0.18.46899 > 10.42.0.1.6969: UDP, length 1400
07:05:13.758524 IP 10.42.0.18.46899 > 10.42.0.1.6969: UDP, length 521
07:05:13.758552 IP 10.42.0.18.46899 > 10.42.0.1.6969: UDP, length 1400
07:05:13.758585 IP 10.42.0.18.46899 > 10.42.0.1.6969: UDP, length 1400

I tried I think almost every solutions offered by my many Google searches, none worked.

The GStreamer version on the PC is 1.14.5, the GStreamer version on the RPi is 1.16.2.

Ingo
  • 42,961
  • 20
  • 87
  • 207

0 Answers0