Skip to content

Instantly share code, notes, and snippets.

@reinzor
Last active July 2, 2024 19:46
Show Gist options
  • Save reinzor/812a1dadd62dcf2a309c9c99af92244f to your computer and use it in GitHub Desktop.
Save reinzor/812a1dadd62dcf2a309c9c99af92244f to your computer and use it in GitHub Desktop.
GStreamer UDP stream examples

MJPEG

Server (Ubuntu 16.04)

gst-launch-1.0 -v filesrc location= /home/rein/Videos/big_buck_bunny_720p_30mb_0_0.mp4 ! decodebin ! videoconvert ! jpegenc ! rtpjpegpay ! udpsink host=localhost port=5000

Client (Ubuntu 16.04)

gst-launch-1.0 udpsrc  port=5000 ! application/x-rtp,encoding-name=JPEG,payload=26 ! rtpjpegdepay ! jpegdec ! autovideosink

H264

Server (Ubuntu 16.04)

gst-launch-1.0 -v filesrc location= /home/rein/Videos/big_buck_bunny_720p_30mb_0_0.mp4 ! decodebin ! videoconvert ! x264enc tune=zerolatency ! rtph264pay ! udpsink host=localhost port=5000

Client (Ubuntu 16.04)

gst-launch-1.0 udpsrc port=5000 ! application/x-rtp,media=video,clock-rate=90000,encoding-name=H264,payload=96 ! rtph264depay ! avdec_h264 ! autovideosink
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment