Quick-start guide to gst-uninstalled for GStreamer 1.x

Update: gst-build is the current way to build GStreamer for developement. I’m leaving the post up for posterity, but other than the note on getting dependencies, you should not be using this.

One of the first tools that you should get if you’re hacking with GStreamer or want to play with the latest version without doing evil things to your system is probably the gst-uninstalled script. It’s the equivalent of Python’s virtualenv for hacking on GStreamer. :)

The documentation around getting this set up is a bit frugal, though, so here’s my attempt to clarify things. I was going to put this on our wiki, but that’s a bit search-engine unfriendly, so probably easiest to just keep it here. The setup I outline below can probably be automated further, and comments/suggestions are welcome.

  • First, get build dependencies for GStreamer core and plugins on your distribution. Commands to do this on some popular distributions follow. This will install a lot of packages, but should mean that you won’t have to play find-the-plugin-dependency for your local build.
  • Fedora: $ sudo yum-builddep gstreamer1-*
  • Debian/Ubuntu: $ sudo apt-get build-dep gstreamer1.0-plugins-{base,good,bad,ugly}
  • Gentoo: having the GStreamer core and plugin packages should suffice
  • Others: drop me a note with the command for your favourite distro, and I’ll add it here

  • Next, check out the code (by default, it will turn up in ~/gst/master)

  • $ curl https://cgit.freedesktop.org/gstreamer/gstreamer/plain/scripts/create-uninstalled-setup.sh | sh
  • Ignore the pointers to documentation that you see — they’re currently defunct

  • Now put the gst-uninstalled script somewhere you can get to it easily:

  • $ ln -sf ~/gst/master/gstreamer/scripts/gst-uninstalled ~/bin/gst-master
  • (the -master suffix for the script is important to how the script works)

  • Enter the uninstalled environment:

  • $ ~/bin/gst-master
  • (this puts you in the directory with all the checkouts, and sets up a bunch of environment variables to use your uninstalled setup – check with echo $GST_PLUGIN_PATH)

  • Time to build

  • $ ./gstreamer/scripts/git-update.sh

  • Take it out for a spin

  • $ gst-inspect-1.0 filesrc
  • $ gst-launch-1.0 playbin uri=file:///path/to/some/file
  • $ gst-discoverer-1.0 /path/to/some/file

  • That’s it! Some tips:

  • Remember that you need to run ~/bin/gst-master to enter the environment for each new shell
  • If you start up a GStreamer app from your system in this environment, it will use your uninstalled libraries and plugins
  • You can and should periodically update you tree by rerunning the git-update.sh script
  • To run gdb on gst-launch, you need to do something like:
  • $ libtool --mode=execute gdb --args gstreamer/tools/gst-launch-1.0 videotestsrc ! videoconvert ! xvimagesink
  • I find it useful to run cscope on the top-level tree, and use that for quick code browsing

Update: Fixed create-uninstalled.sh link to use https (thanks to Victor for pointing this out).

24 Comments

Add yours

  1. Terribly excited to see this, since building all of gst is daunting. However I have run onto the following: make[4]: Entering directory /home/doug/gst/master/gst-plugins-base/gst/audioconvert' CC libgstaudioconvert_la-gstaudioconvert.lo CC libgstaudioconvert_la-audioconvert.lo CC libgstaudioconvert_la-gstchannelmix.lo CC libgstaudioconvert_la-gstaudioquantize.lo gstaudioquantize.c: In function 'gst_audio_quantize_quantize_int_none_none': gstaudioquantize.c:88:3: error: implicit declaration of function 'audio_convert_orc_int_bias' [-Werror=implicit-function-declaration] audio_convert_orc_int_bias (dst, src, quant->bias, ~quant->mask, ^ gstaudioquantize.c:88:3: error: nested extern declaration of 'audio_convert_orc_int_bias' [-Werror=nested-externs] gstaudioquantize.c: In function 'gst_audio_quantize_quantize_int_dither_none': gstaudioquantize.c:158:3: error: implicit declaration of function 'audio_convert_orc_int_dither' [-Werror=implicit-function-declaration] audio_convert_orc_int_dither (dst, src, quant->dither_buf, ~quant->mask, ^ gstaudioquantize.c:158:3: error: nested extern declaration of 'audio_convert_orc_int_dither' [-Werror=nested-externs] cc1: all warnings being treated as errors make[4]: *** [libgstaudioconvert_la-gstaudioquantize.lo] Error 1 make[4]: Leaving directory/home/doug/gst/master/gst-plugins-base/gst/audioconvert' make[3]: *** [all] Error 2 make[3]: Leaving directory /home/doug/gst/master/gst-plugins-base/gst/audioconvert' make[2]: *** [audioconvert] Error 2 make[2]: Leaving directory/home/doug/gst/master/gst-plugins-base/gst' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/doug/gst/master/gst-plugins-base' make: *** [all] Error 2

    Any ideas on who to pester about this?

  2. __tim from #gstreamer pushed fix. Looks good now.

  3. Victor Weinstein

    April 18, 2016 — 11:59 pm

    It’s a minor point, but the script has moved. If you execute the command as specified above,

    curl http://cgit.freedesktop.org/gstreamer/gstreamer/plain/scripts/create-uninstalled-setup.sh | sh

    it fails because the path to the file has changed. The above file reveals the new path and the command should be executed instead as (note that http is changed to https)

    curl https://cgit.freedesktop.org/gstreamer/gstreamer/plain/scripts/create-uninstalled-setup.sh | sh

    Although I was able to execute and run a simple pipeline command,

    gst-launch-1.0 videotestsrc ! autovideosink

    I also noticed some failure messages at the end of the ./gstreamer/scripts/git-update.sh script, $ ./gstreamer/scripts/git-update.sh + updating gstreamer Current branch master is up to date. + updating gst-plugins-base Current branch master is up to date. + updating gst-plugins-good Current branch master is up to date. + updating gst-plugins-ugly Current branch master is up to date. + updating gst-plugins-bad Current branch master is up to date. + updating gst-libav Current branch master is up to date. + gstreamer: autogen.sh + gstreamer: autogen.sh done + gstreamer: make + gstreamer: make done + gst-plugins-base: autogen.sh + gst-plugins-base: autogen.sh done + gst-plugins-base: make + gst-plugins-base: make done + gst-plugins-good: autogen.sh + gst-plugins-bad: autogen.sh + gst-plugins-ugly: autogen.sh + gst-libav: autogen.sh + gst-plugins-ugly: autogen.sh done + gst-plugins-ugly: make + gst-plugins-good: autogen.sh done + gst-plugins-good: make + gst-plugins-ugly: make done + gst-plugins-good: make done Failures:

    gst-libav: autogen.sh [/tmp/git-update.20160418-1203-.18163.1309.20817.23187/gst-libav-gen.log] gst-plugins-bad: autogen.sh [/tmp/git-update.20160418-1203-.18163.1309.20817.23187/gst-plugins-bad-gen.log]

    I don’t know that this indicates any particular issue but suggests that the devel versions of the gst-libav and gst-plugins-bad are not getting built.

  4. On Ubuntu 15.04 the gst-libav build failed because of missing yasm or nasm installation (configure script would exit with an error).

    After installing that via apt-get, the build would still failed if called immediatly via git-update.sh.

    It was necessary to call configure script in the gst-libav tree manually in order to have it run through.

    After that, calling git-update.sh again succeeded in a complete build.

  5. Can you please check this error? Below is the output at the terminal

    Checking basic build tools and dependencies are installed…

    Cloning into ‘gstreamer’… remote: Counting objects: 141066, done. remote: Compressing objects: 100% (30854/30854), done. remote: Total 141066 (delta 111665), reused 137994 (delta 109339) Receiving objects: 100% (141066/141066), 25.97 MiB | 204.00 KiB/s, done. Resolving deltas: 100% (111665/111665), done. fatal: did not receive expected object 740b78849117076711eb27410bd383bd90d0d684 fatal: index-pack failed

  6. For whoever is reading this, a newer gst-uninstalled is more easily setup with gst-build:

    https://github.com/GStreamer/gst-build

  7. what about RHEL

  8. Hi , Thanks for your work in advance . I’m working with Raspberry pi.

    I have tried follow the procedure above but I can’t succeed at the first step..

    I implemented bellow sudo apt-get build-dep gstreamer1.0-plugins-{base,good,bad,ugly}

    Unfortunately. I saw error message like bellow. E: You must put some ‘source’ URIs in your sources.list

    Maybe, I have to edit /etc/apt/sources.list but I don’t Know the uri of repository.

    Could you tell me how to solve it.

    Thanks again. Waiting for reply.

  9. Hi Thanks for the guide, followed all the steps,everything is setupbut when i try to inspect,:- gst-inspect-1.0 webrtcbin

    it gives error:- No such element or plugin ‘webrtcbin’

  10. I see you don’t monetize arunraghavan.net, don’t waste your traffic, you can earn extra bucks every month with new monetization method. This is the best adsense alternative for any type of website (they approve all websites), for more details simply search in gooogle: murgrabia’s tools

  11. Mahesh Bhogineni

    February 7, 2020 — 1:55 pm

    Hello Arun,

    Earlier this used to work perfect. Now I am facing many issues for the same. Can you confirm is this still working?

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.