GStreamer

GStreamer is a powerful tool which allows streaming complex video pipes over network. Simple pipelines to stream and receive video provided below.

Stream video to network over UDP socket

gst-launch-1.0 -v v4l2src device=/dev/video1 do-timestamp=true ! video/x-h264, width=1920, \ 
height=1080, framerate=30/1 ! h264parse ! queue ! \ 
rtph264pay config-interval=10 pt=96 ! udpsink \ 
host=192.168.0.111 port=5600 sync=false

Receive stream and display on monitor

gst-launch-1.0 -e -v udpsrc port=5600 ! application/x-rtp, encoding-name=H264,payload=96 ! \ 
rtpjitterbuffer ! rtph264depay ! avdec_h264 ! autovideosink

Receive stream, display and record

gst-launch-1.0 -e -v udpsrc port=5600 ! tee name=STREAMOUT ! \ 
tee name=VIDEOWINDOW ! queue ! application/x-rtp, encoding-name=H264, payload=96 ! \ 
rtph264depay ! h264parse ! mp4mux ! filesink location=myvideo.mp4 STREAMOUT. ! \ 
queue ! udpsink port=5700 VIDEOWINDOW. ! queue ! application/x-rtp, \ 
payload=96 ! rtph264depay ! avdec_h264 ! autovideosink