Sending UDP stream from RPi 4 to PC (over ethernet)

etne louis.etienne82 at orange.fr
Thu Dec 17 14:35:38 UTC 2020


Hello !

For our project, we need to send a GStream stream over udp from a RPi4
connected to a PC via ethernet. The RPi4 address is 10.42.0.18 and the PC
address is 10.42.0.1.

We have successfully tried with TCP using the following sender pipeline :
appsrc fromat=(string)\"BGR\" ! videoconvert ! x264enc tune=zerolatency
speed-preset=ultrafast !  mpegtsmux !  tcpserversink host=10.42.0.18
port=6969

And the following receiver pipeline:
gst-launch-1.0 -v tcpclientsrc port=6969 host=10.42.0.18  ! tsdemux !
h264parse ! avdec_h264 ! videoconvert ! xvimagesink

On the sender pipeline, we are using appsrc because we are writing our
frames with OpenCV VideoWriter. The problem is the latency, thus why we need
to use UDP.

We tried with the following sender pipeline:
appsrc fromat=(string)\"BGR\" ! videoconvert ! x264enc tune=zerolatency
speed-preset=ultrafast !  rtph264pay config-interval=0 pt=96 ! udpsink
host=10.42.0.1 port=6969

And the following receiving pipeline:
gst-launch-1.0 -v udpsrc address=10.42.0.1 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

Using tcpdump -n udp port 6969 on the PC, we can see that we are receiving
our packets but no video is displaying.

Using these two pipelines on a localhost network (no RPi), it works like a
charm.

How can we stream our frames from the RPi to the PC using UDP?

Thanks.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list