Streaming from picamera on PI4

First let’s install some dependencies

sudo apt-get install gstreamer-tools gstreamer1.0-plugins-bad gstreamer1.0-plugins-good

Server will open the raspivid cli tool and pipe on stdout, streamer will take the input and parse h264 and stream as rtp

raspivid -t 0 -h 720 -w 1080 -fps 25 -hf -b 2000000 -o - | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=1 pt=96 ! gdppay ! tcpserversink host= port=5000

Client will open a window displaying the video feedback

gst-launch-1.0 -v tcpclientsrc host=<pi4-ip> port=5000 ! gdpdepay ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink sync=false


Based on the article from