Skip to content

Instantly share code, notes, and snippets.

@alasin
Last active October 21, 2020 21:31
Show Gist options
  • Save alasin/0be40411eea149343a296c85e0407bd7 to your computer and use it in GitHub Desktop.
Save alasin/0be40411eea149343a296c85e0407bd7 to your computer and use it in GitHub Desktop.
Script for installing Gstreamer and plugins. Change version number accordingly.
#!/bin/bash
VERSION=1.12.0
mkdir ~/gstreamer_$VERSION
cd ~/gstreamer_$VERSION
wget https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-$VERSION.tar.xz
wget https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-$VERSION.tar.xz
wget https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-$VERSION.tar.xz
wget https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-$VERSION.tar.xz
wget https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-$VERSION.tar.xz
wget https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-$VERSION.tar.xz
for a in `ls -1 *.tar.*`; do tar -xf $a; done
sudo apt-get install build-essential dpkg-dev flex bison autotools-dev automake \
liborc-dev autopoint libtool gtk-doc-tools yasm libgstreamer1.0-dev \
libxv-dev libasound2-dev libtheora-dev libogg-dev libvorbis-dev \
libbz2-dev libv4l-dev libvpx-dev libjack-jackd2-dev libsoup2.4-dev libpulse-dev \
faad libfaad-dev libfaac-dev libgl1-mesa-dev libgles2-mesa-dev \
libx264-dev libmad0-dev
export PKG_CONFIG_PATH=/home/$USER/gstreamer_$VERSION/out/lib/pkgconfig:$PKG_CONFIG_PATH
cd ~/gstreamer_$VERSION
cd gstreamer-$VERSION
./configure --prefix=/home/$USER/gstreamer_$VERSION/out ; make ; make install ; cd ..
#Base
cd gst-plugins-base-$VERSION
./configure --prefix=/home/$USER/gstreamer_$VERSION/out ; time make ; make install ; cd ..
#Good - 8 minutes
cd gst-plugins-good-$VERSION
./configure --prefix=/home/$USER/gstreamer_$VERSION/out ; time make ; make install ; cd ..
#Bad
cd gst-plugins-bad-$VERSION
./configure --prefix=/home/$USER/gstreamer_$VERSION/out ; time make ; make install ; cd ..
# Ugly
cd gst-plugins-ugly-$VERSION
./configure --prefix=/home/$USER/gstreamer_$VERSION/out ; time make ; make install ; cd ..
# LibAV
cd gst-libav-$VERSION
./configure --prefix=/home/$USER/gstreamer_$VERSION/out ; time make ; make install ; cd ..
echo export PKG_CONFIG_PATH=/home/$USER/gstreamer_$VERSION/out/lib/pkgconfig:$PKG_CONFIG_PATH >> ~/.bashrc
echo export PATH=/home/$USER/gstreamer_$VERSION/out/bin:$PATH >> ~/.bashrc
source ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment