GStreamer Setup

less than 1 minute read

This guide was tested on Linux Mint and a Raspberry Pi.


Is a library with a set of tools for multimedia.


Following a LCA2018 Gstreamer tutorial:

sudo apt-get install gstreamer1.0-dev gstreamer1.0-tools \
gstreamer1.0-plugins-\* gstreamer1.0-libav

Hello world


gst-launch-1.0 audiotestsrc ! audioconvert ! autoaudiosink


gst-launch-1.0 videotestsrc ! videoconvert ! autovideosink

I have found that gstreamer drops a lot of frames on VMs. For testing on VMs, use videotestsrc.

With a camera

With a webcam or USB camera:

gst-launch-1.0 v4l2src device=/dev/video0 \
! videoconvert ! autovideosink

When using a raspberry pi camera, we will want to specify framerate and resolution:

gst-launch-1.0 v4l2src device=/dev/video0 \
! video/x-raw,width=640,height=480,framerate=30/1 \
! videoconvert ! autovideosink