Building and Installing the latest versions of gstreamer in Ubuntu 22.04LTS

bishop-00median at icloud.com bishop-00median at icloud.com
Mon Jul 17 01:22:13 UTC 2023


I have had success building the latest on 22.04 with the following:

If you run into issues, let me know. 

Please try the following. The script is a subset of a larger script that included some merges so not all of the packages will be necessary as some of them are for ffmpeg. You will also see the same package a couple of times. Ubuntu will ignore that. I am running Python 3.8.10 for library compatibility.


#basic 
sudo apt-get -y update && sudo apt-get -y upgrade
sudo apt-get -y install build-essential openssh-server curl nano wget git net-tools libssl-dev
sudo apt-get update -qq && sudo apt-get -y install  autoconf   automake   build-essential   cmake   git-core   libass-dev   libfreetype6-dev   libgnutls28-dev   libsdl2-dev   libtool   libva-dev   libvdpau-dev   libvorbis-dev   libxcb1-dev   libxcb-shm0-dev   libxcb-xfixes0-dev   pkg-config   texinfo   wget   zlib1g-dev   yasm libx264-dev libx265-dev libnuma-dev libvpx-dev   libfdk-aac-dev libmp3lame-dev libopus-dev

#PYTHON
cd ~/
wget https://www.python.org/ftp/python/3.8.10/Python-3.8.10.tgz
tar -xvf ./Python-3.8.10.tgz
cd ./Python-3.8.10
./configure --enable-optimizations
make
sudo altinstall

#IGNORE THE FACT THE SOME PACKAGES ARE INSTALLED TWICE
sudo apt-get -y install build-essential
sudo apt-get -y install libsoup2.4-1 libsoup2.4-dev libsrtp2-1 libsrtp2-dev
sudo apt-get -y install autoconf automake build-essential cmake git-core libass-dev
sudo apt-get -y install libfreetype6-dev libgnutls28-dev libsdl2-dev libtool libva-dev
sudo apt-get -y install libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev 
sudo apt-get -y install libxcb-xfixes0-dev pkg-config texinfo wget zlib1g-dev 
sudo apt-get -y install yasm libx264-dev libx265-dev libnuma-dev libvpx-dev 
sudo apt-get -y install libfdk-aac-dev libmp3lame-dev libopus-dev
sudo apt-get -y install python3-pip libssl-dev
sudo apt-get -y install libgdk-pixbuf2.0-0

#RUST
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
cargo install cargo-c

#GSTREAMER
git clone https://gitlab.freedesktop.org/gstreamer/cerbero
cd ./cerbero/
./cerbero-uninstalled bootstrap
pip3 install --user meson
pip3 install tomli

sudo cp ~/.local/bin/meson /usr/local/bin

wget https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip
unzip ninja-linux.zip 
sudo cp ./ninja /usr/local/bin/
git clone https://gitlab.freedesktop.org/gstreamer/gstreamer.git
cd ./gstreamer/
mkdir builddir
meson setup builddir -Dgpl=enabled -Drs=enabled
#meson setup --wipe builddir -Dgpl=enabled -Drs=enabled
ninja -C builddir
python3 ./gst-env.py 
gst-launch-1.0 --gst-version

You might need to disable some of the gst-plugins-bad. If you run into build issues, send me you output and I’ll assist.

Should you need to rerun the build, you will run the following:

meson setup --wipe builddir -Dgpl=enabled -Drs=enabled


> On Jul 16, 2023, at 4:03 PM, James via gstreamer-devel <gstreamer-devel at lists.freedesktop.org> wrote:
> 
> 
> 
>> On 17 Jul 2023, at 1:11 am, GST Developer via gstreamer-devel <gstreamer-devel at lists.freedesktop.org> wrote:
>> 
>> Hi Folks.
>> 
>> I am trying to build and install the current gstreamer (1.22 or 1.23) in Ubuntu 22.04LTS
>> apt install will only get version 1.20 so I need to build from source.
>> This has proven to be tricky, and I wondered if anyone had a good recipe.  
>> The first issue is the need for meson 0.62 (apt install delivers 0.61).  I have addressed that with a manual install of 0.62 via pip and this gets you through building sucessfully
>> However, when it comes to installing, with sudo ninja install we hit another issue, with mesonbuild which I have not been able to resolve. I believe some of the issue might be related to hard coded paths to specific binaries.
>> 
>> Does anyone have a known working sequence of commands to build *and* install GStreamer from source on Ubuntu 22.04 LTS ?
> 
> 
> I followed the wiki and had no problems (was for 1.20)
> The only bit that got me is hidden in the wiki: how to build a system install not a test sandbox.
> James


More information about the gstreamer-devel mailing list