Skip to content

Instantly share code, notes, and snippets.

@michaelfranzl
Last active January 17, 2018 07:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelfranzl/aa4b620c2c6d28cdf0fc4adab4217bff to your computer and use it in GitHub Desktop.
Save michaelfranzl/aa4b620c2c6d28cdf0fc4adab4217bff to your computer and use it in GitHub Desktop.
Compilation of GStreamer, and as many plugins as possible, from upstream git sources, on Debian 9 (Stretch)

The following shell commands install GStreamer for an unprivileged user, not system-wide. Adapt INSTALLDIR for your purposes. The GStreamer binaries will be installed into $INSTALLDIR/bin. Normally you would set INSTALLDIR to your home directory (you need to specify it as an absolute path). Consider adding $INSTALLDIR/bin to your PATH environment variable. After installation, check the outputs of which gst-launch-1.0 and gst-launch-1.0 --version, to see if you are using the correct binaries.

All following shell commands should be run as an unprivileged user, with the exception of apt-get install's. I have included installation instructions of as many external dependencies as possible to maximize the number of GStreamer plugins built. You may want to use only a subset of them. I may have forgotten some external dependencies, in which case the compilation should not fail, but simply the corresponding plugin skipped. Check the last output lines of each autogen.sh run to see which plugins will be build and which won't.

This script works for Debian 9 (Stretch) and GStreamer version 1.13.0 (GIT). It is likely to work with similar GStreamer versions and Debian versions (or Debian-derived distributions like Ubuntu). If you decide to use other versions, you will have to adapt the script.

This script is EXPERIMENTAL and provided "AS IS". Copyright 2017 Michael Karl Franzl

INSTALLDIR=/tmp/progs

mkdir -p $INSTALLDIR

mkdir gstreamer-src
cd gstreamer-src

Core of gstreamer:

apt-get install gtk-doc-tools liborc-0.4-dev libunwind-dev libdw-dev
git clone git://anongit.freedesktop.org/gstreamer/gstreamer
cd gstreamer
./autogen.sh --prefix=$INSTALLDIR
make
make install

Plugins "base":

apt-get install libxv-dev libcdparanoia-dev libvisual-0.4-dev
cd ..
git clone git://anongit.freedesktop.org/gstreamer/gst-plugins-base
cd gst-plugins-base
PKG_CONFIG_PATH=$INSTALLDIR/lib/pkgconfig ./autogen.sh --prefix=$INSTALLDIR
make
make install

Plugins "good":

apt-get install libdv4-dev libaa1-dev libflac-dev libmp3lame-dev libcaca-dev libmpg123-dev libavc1394-dev libtwolame-dev libvpx-dev libwavpack-dev
cd ..
git clone git://anongit.freedesktop.org/gstreamer/gst-plugins-good
cd gst-plugins-good
# It seems that there is no way to tell the configure script to build all no-external-dependency-plugins. So they are specified explicitly here.
PKG_CONFIG_PATH=$INSTALLDIR/lib/pkgconfig ./autogen.sh --prefix=$INSTALLDIR --enable-v4l2-probe --with-gudev --enable-experimental --with-plugins=alpha,apetag,audiofx,audioparsers,auparse,autodetect,avi,cutter,debugutils,deinterlace,dtmf,effectv,equalizer,flv,flx,goom,goom2k1,icydemux,id3demux,imagefreeze,interleave,isomp4,law,level,matroska,monoscope,multifile,replaygain,rtp,rtpmanager,rtsp,shapewipe,smpte,spectrum,udp,videobox,videocrop,videofilter,videomixer,wavenc,wavparse,y4m
make
make install

Plugins "bad":

apt-get install libusb-dev libusb-1.0-0-dev libass-dev libvo-amrwbenc-dev libvo-aacenc-dev libbs2b-dev libchromaprint-dev libwebp-dev libdca-dev libfaad-dev libfdk-aac-dev flite1-dev libfluidsynth-dev libkate-dev ladspa-sdk lv2-dev libde265-dev libmms-dev libsrtp0-dev libsrtp2-dev libmodplug-dev libmjpegtools-dev libmpeg2-4-dev libmpeg3-dev libmpcdec-dev libneon27-dev libofa0-dev libopenal-dev libopencv-dev libopenexr-dev libx264-dev libopenjp2-7-dev libopenmpt-dev libopenni-dev libopus-dev librsvg2-dev libvulkan-dev libsoundtouch-dev libspctag-dev libgme-dev libvdpau-dev libsbc-dev libzbar-dev librtmp-dev libx265-dev libwebrtc-audio-processing-dev
cd .. 
git clone git://anongit.freedesktop.org/gstreamer/gst-plugins-bad
cd gst-plugins-bad
# The qt plugin caused a compilation error due to a missing header file. So disabled.
PKG_CONFIG_PATH=$INSTALLDIR/lib/pkgconfig ./autogen.sh --prefix=$INSTALLDIR --disable-qt
make
make install

Plugins "ugly":

apt-get install libx264-dev libmpeg2-4-dev libdvdread-dev libcdio-dev liba52-0.7.4-dev
cd .. 
git clone git://anongit.freedesktop.org/gstreamer/gst-plugins-ugly
cd gst-plugins-ugly
PKG_CONFIG_PATH=$INSTALLDIR/lib/pkgconfig ./autogen.sh --prefix=$INSTALLDIR
make
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment