Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
@BobbyWibowo

This comment has been minimized.

Copy link

@BobbyWibowo BobbyWibowo commented Aug 28, 2018

Add #!/bin/bash at the top if you're getting Syntax error: redirection unexpected (reference).

@jackersson

This comment has been minimized.

Copy link
Owner Author

@jackersson jackersson commented Aug 31, 2018

BobbyWibowo, thanks)

@jyotendra

This comment has been minimized.

Copy link

@jyotendra jyotendra commented Mar 18, 2019

Thanks a ton !

@rashmikramesh

This comment has been minimized.

Copy link

@rashmikramesh rashmikramesh commented Jun 19, 2019

How do I resolve this? (on RHEL 5.3)

orc]$ ./autogen.sh --disable-gtk-doc
configure.ac:69: error: possibly undefined macro: AC_CHECK_LIBM
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /usr/local/bin/autoconf failed with exit status: 1

@jefflgaol

This comment has been minimized.

Copy link

@jefflgaol jefflgaol commented Nov 15, 2019

cd orc
./autogen.sh --disable-gtk-doc

I think they no longer provide ./autogen.sh. Instead, we need to use meson and ninja.

@rmsoto

This comment has been minimized.

Copy link

@rmsoto rmsoto commented Jan 7, 2020

@jefflgaol do you have an example for meson/ninja commandline?

@jveitchmichaelis

This comment has been minimized.

Copy link

@jveitchmichaelis jveitchmichaelis commented Mar 23, 2020

@rmsoto To use meson:

pip3 install meson
sudo apt install ninja-build
cd orc/build
meson ..
ninja
ninja install

Note that you'll need to set LD_LIBRARY_PATH to include /usr/local/lib/{arch}-linux-gnu (e.g. /usr/local/lib/aarch64-linux-gnu) otherwise orc will throw a fit when you try and run it. Make sure you can run: orcc without errors.

@l4es

This comment has been minimized.

Copy link

@l4es 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.

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