How to install Gstreamer on Ubuntu
2 min. read
Gstreamer is essential package for Ubuntu, but there could be some missing packages that are required for app development. So with next steps you are going to install Gstreamer on your PC.
Checkout Dockerfile to build Docker Image for Ubuntu 18 and Gstreamer.
docker build -t gstreamer:latest /path/to/Dockerfile xhost +local: # To enable UI sudo docker run --name ubuntu-gstreamer -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix gstreamer:latest
Note: For Ubuntu 16.04 checkout Dockerfile
Go to Launch First Pipeline Section to check installation.
Check if any version of Gstreamer already installed
If you see similar response
You already have Gstreamer installed on your PC. But look at next steps to check that all required packages for development are also installed.
Check Gstreamer Version
Additional you can check version of installed package typing
You should get similar response in terminal
gst-inspect-1.0 version 1.14.1 GStreamer 1.14.1 (GIT)
sudo apt-get update sudo apt-get upgrade sudo apt-get build-essential sudo apt-get pkg-config
Install main Gstreamer packages (*source)
sudo apt-get install libgstreamer1.0-0 gstreamer1.0-dev gstreamer1.0-tools gstreamer1.0-doc sudo apt-get install gstreamer1.0-plugins-base gstreamer1.0-plugins-good sudo apt-get install gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly sudo apt-get install gstreamer1.0-libav sudo apt-get install gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio
Have you noticed words ‘bad, ugly, good’ in libraries names? Don’t worry, those are not based on personal qualities 🙂 Here is an official doocumentation with explanation of each module and it’s name.
- gst-plugins-good – a set of good-quality plug-ins under our preferred license, LGPL
- gst-plugins-ugly – a set of good-quality plug-ins that might pose distribution problems
- gst-plugins-bad – a set of plug-ins that need more quality, testing or documentation
Launch first pipeline
Type in command line simple command to check that everything works as supposed:
gst-launch-1.0 videotestsrc ! autovideosink
Expected result should be something like this:
In case you installing Gstreamer on remote PC without any display, use fakesink instead of autovideosink.
Hope everything works just great and you are ready to make some awesome applications. If not, – leave a problem description in comments to this post. We are going to find a way to fix it 🙂
How to build Gstreamer from Sources?
- If there is a need to build gstreamer from sources, use the following guide
Hi Taras. Thanks for a neat and simple tutorial!
Could you also share your overall experience with GStreamer? How easy is to set up a simple pipeline to detect person faces on the video feed?