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

Marc Leeman marc.leeman at gmail.com
Fri Dec 18 11:54:23 UTC 2020


This should do it:

appsrc fromat=(string)\"BGR\" ! videoconvert ! x264enc tune=zerolatency
speed-preset=ultrafast !  h264parse ! rtph264pay config-interval=1 !
rtpsink uri=rtp://239.1.2.3:1234

gst-launch-1.0 -v rtpsrc uri=rtp://239.1.2.3:1234?encoding-name=H264 !
rtph264depay ! h264parse !
avdec_h264 lowres=1 ! videoconvert ! autovideosink

On Fri, 18 Dec 2020 at 12:30, etne <louis.etienne82 at orange.fr> wrote:
>
> 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/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



-- 
g. Marc


More information about the gstreamer-devel mailing list