How to build Gstreamer from sources on Ubuntu?

    When developing  real-time streaming applications using Gstreamer I prefer to build library from sources, than install from official Ubuntu repositories via apt-get. Also building Gstreamer from sources gives you more flexibility and there are a lot of bug fixes, features in latest versions.

     Ordered list of packages to build:   

      For Gstreamer installation from sources I created simple script BUILD-GSTREAMER.SH. Launch in terminal:

      Also next links could be useful for advanced cases:


#1. Install gstreamer


#2. Install gst-plugins-base


#3. Install gst-plugins-good


#4. Install gst-libav


#5. Install gst-plugins-bad


#6. Install gst-plugins-ugly


#7. Install gst-python


     Test gst-python     

     If no error messages, than gst-python working correctly, otherwise read next “Usage Tips”

 Usage Tips

     How to use Gstreamer-Python in virtual environment?

     How to fix “Plugin not registered”?

Locate GI_PATH:

For example:


  • Find path to gst-python (from which you’ve built gstreamer for python).
  • Check GST_PYTHON_PATH/gi/overrides has next files (,,, _gi_gst.cpython-*m-*

Copy files from GST_PYTHON_PATH/gi/overrides to GI_PATH/overrides. For example:

Installation Tips

#1. Enable Orc

    Orc accelerates code and makes more efficient data processing (read more). Most of gstreamer plugins (gst-plugins-bad, gst-plugins-ugly, gst-libav) use Orc under the hood. To build Orc from sources use

    Check also this official doc for Orc installation

    Or install with sudo

#2. Failed to load plugin


#3. Enable/disable Gtk-docs

#6. Check available flags for lib configuration

Hope everything works fine. Leave questions, problems in comments, I’ll try to find solutions and update this post 😉


Add a Comment

Your email address will not be published. Required fields are marked *