How to install gst version 1.22 on Ubuntu?

Hi.
I have Ubuntu 22.04 which installs version 1.20 of gst, but I need 1.22.
So I found deb packets (amd64 build : 1.22.5-1 : gstreamer1.0 package : Ubuntu) and install them. Now gst-launch-1.0 --versions shows 1.22. But there is problem with plugins (good,bad,ugly). I install them as described here – Installing on Linux. But according to inspections it installs 1.20 version. So how to install full 1.22 version on Ubuntu? Is there single deb package for everything? Or there is only one way – build from source?

Thanks in advance.

The only way I’ve found to work is this -

  1. Build from source
  2. Install to a custom location
  3. Use environment variable LD_LIBRARY_PATH=/custom/installation/path to load when needed

Don’t install over the Ubuntu packaged GStreamer 1.20, it breaks things!

2 Likes

Thank you! Can you explain what does mean “install to custom location”? Also, do I get all plugins via building from source code?

When you configure the build with meson you can set where it will be installed to using --prefix, eg

$ meson configure --prefix=/wherever/you/want ...

…and that’s where it’ll go if you run meson install after building

Which plugins get built depends on the configuration and also what dev libraries you have installed. It seems a bit opaque to me, so I’d have a good look at what meson configure outputs to see if you get what you want.

1 Like

I have a related question regarding the building of the libgstnice librairie. Libnice.so is built but not libgstnice. Is there a special argument to pass to meson setup?

I have a similar issue to this one, some caps are not supported which may be due to the lack of this libgstnice.

Thank you. After fight with meson versions (had to download deb package manually and install) I have following error:

subprojects/gstreamer/gst/parse/meson.build:7:0: ERROR: Program ‘flex win_flex’ not found or not executable

I’m on Ubuntu, how win_flex relates to this? It’s meson file in /home/gstreamer/subprojects/gstreamer/gst/parse/

How to deal with it? I simply ran “sudo meson setup gst_bin”

UPDATE: installing flex and bison solved the issue. It should be mentioned somewhere that these utilities are needed…

Btw, it could be solved easily with gst_env.py file. It setups all needed paths.

It wants either flex or win_flex, but it’s a poorly phrased error message (from Meson).

On Debian/Ubuntu you can run sudo apt build-dep gstreamer1.0 for what it’s worth.

1 Like

Try with -Dlibnice=enabled -Dlibnice:gstreamer=enabled.

That’s what I was looking for I suppose. I ended up compiling libnice manually, but my problem was elsewhere (i.e. the webrtcsink module not having the h264 caps while compiling with `-Dgst-plugins-ugly:x264=enabled). But it works fine in the main branch, so all good for me.

Better install it under /opt.
export LD_LIBRARY_PATH=/opt/gstreamer/lib:$LD_LIBRARY_PATH
if your installation path is /opt/gstreamer. The reason of adding this is to let your plugins to find the right libs.

You may need the followings as well:
export LIBVA_DRIVERS_PATH=/opt/gstreamer/lib/dri
export PATH=/opt/gstreamer/bin:$PATH

1 Like