Skip to content

Preparing on Linux with V4L

Software requirements

The demo application uses the open-source GStreamer software. In live camera mode, this Linux version connects to the webcam with V4L (video 4 linux). Before running the application, GStreamer, its plugins, and V4L need to be installed. This section explains how to do that.

On a Debian/Ubuntu-based system all prerequisites can be installed as follows:

sudo apt install v4l-utils libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
  libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base \
  gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \
  gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-gl \
  gstreamer1.0-plugins-base-apps
In case of issues with the above or for other Linux systems, please see the official GStreamer documentation. Make sure to install both the base GStreamer software as well as all the plugin sets: good, bad, and ugly.

Camera support

Most built-in webcams and USB cameras or webcams are compatible with V4L and should work with this demo application, as long as they support the Motion-JPEG (MJPEG) input compression format. If you have V4L installed on your system (see above), this can be verified by running:

v4l2-ctl --list-formats-ext
You should now see at least one camera that has the option 'MJPG' (Motion-JPEG, compressed). With this command you can also observe the supported input resolutions (width and height) for your specific camera.