Skip to content

Instantly share code, notes, and snippets.

@jackersson
Last active March 27, 2023 02:06
Show Gist options
  • Star 15 You must be signed in to star a gist
  • Fork 11 You must be signed in to fork a gist
  • Save jackersson/9d3b0c578c1e625b6b79ea04e2cebd15 to your computer and use it in GitHub Desktop.
Save jackersson/9d3b0c578c1e625b6b79ea04e2cebd15 to your computer and use it in GitHub Desktop.
Build gstreamer from source
#!/bin/bash
# Set your target branch
BRANCH="1.14.2"
exec > >(tee build-gstreamer.log)
exec 2>&1
[ ! -d orc ] && git clone git://anongit.freedesktop.org/git/gstreamer/orc
[ ! -d gstreamer ] && git clone git://anongit.freedesktop.org/git/gstreamer/gstreamer
[ ! -d gst-plugins-base ] && git clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-base
[ ! -d gst-plugins-good ] && git clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-good
[ ! -d gst-plugins-bad ] && git clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-bad
[ ! -d gst-libav ] && git clone git://anongit.freedesktop.org/git/gstreamer/gst-libav
[ ! -d gst-plugins-ugly ] && git clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-ugly
[ ! -d gst-python ] && git clone git://anongit.freedesktop.org/git/gstreamer/gst-python
export LD_LIBRARY_PATH=/usr/local/lib/
cd orc
./autogen.sh --disable-gtk-doc
make
sudo make install
cd ..
cd gstreamer
git checkout $BRANCH
./autogen.sh --disable-gtk-doc
make
sudo make install
cd ..
cd gst-plugins-base
git checkout $BRANCH
./autogen.sh --disable-gtk-doc
make
sudo make install
cd ..
cd gst-libav
git checkout $BRANCH
./autogen.sh --disable-gtk-doc --enable-orc
make
sudo make install
cd ..
cd gst-plugins-good
git checkout $BRANCH
./autogen.sh --disable-gtk-doc
make
sudo make install
cd ..
cd gst-plugins-bad
git checkout $BRANCH
./autogen.sh --disable-gtk-doc --enable-orc
make
sudo make install
cd ..
cd gst-plugins-ugly
git checkout $BRANCH
./autogen.sh --disable-gtk-doc --enable-orc
make
sudo make install
cd ..
# export PYTHON=/usr/bin/python3 (Specify required python version)
cd gst-python
git checkout $BRANCH
./autogen.sh --disable-gtk-doc --noconfigure
# with-libpython-dir -> location of libpython*.so
./configure --with-libpython-dir="/usr/lib/x86_64-linux-gnu"
make
sudo make install
cd ..
sudo ldconfig
@l4es
Copy link

l4es commented Feb 20, 2021

Hi @ALL,

The working version of orc seems to be orc-0.4.25. With this version, we can still use ./autogen.sh to build it and there will be no warning or error about mismatched version of orc while compiling the plugins.

Best regards,
Pascal.

@SonnyWalkman
Copy link

Could the script build use meson and ninja?
I thought most are steering away of make and cmake?

Rob

@jveitchmichaelis
Copy link

@SonnyWalkman see my comment above, though that was a couple of years ago.

@SonnyWalkman
Copy link

SonnyWalkman commented Mar 27, 2023

Sorry @jveitchmichaelis Thanks..
Question, what is the purpose of orc? never been exposed to orc. Is it a helper of some kind?

Rob

@jveitchmichaelis
Copy link

Orc is a compiler

https://gstreamer.freedesktop.org/projects/orc.html

But see also: https://gstreamer.freedesktop.org/documentation/installing/building-from-source-using-meson.html

You should be able to build all of gstreamer with meson and ninja ^. It's officially supported it seems.

@SonnyWalkman
Copy link

SonnyWalkman commented Mar 27, 2023

Thanks for the quick update.
I've been building my own script for building the latest gstreamer build like 1.22.1 using another script which uses wget and untaring each into folders. I use to be able to build the full list gstreamer, base, good, bad, ugly plugings however since the update to meson I continually need to change my script. I can build gstreamer 1.22.1 then we advancing through other folder to build base etc meson bombs out not finding the base build files just created. Reports something on the sorts of can't fine directory needing gstreamer 1.20.3 requires >= 1.22.1? Do you reckon I can work out what I need to do? Spent days on looking for a solution. I need to build x264enc and faac from source.

Rob

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment