I am trying to use GStreamer 1.24 with its Python bindings. I use a similar setup for 1.22, but with this version libgstpython.so
is blacklisted. It’s in the same location as the other plugins, has the same architecture. I’ve tried with different Python version, to the same end. Any help would be much appreciated!
FROM ubuntu:24.04
# Install Python
ARG PYTHON_VERSION=3.9.18
WORKDIR /opt
RUN apt update -y && apt upgrade -y && \
apt install -y libbz2-dev libsqlite3-dev zlib1g-dev libffi-dev wget curl build-essential libssl-dev openssl vim && \
wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz && \
tar xzvf Python-${PYTHON_VERSION}.tgz && \
cd Python-${PYTHON_VERSION} && \
./configure --enable-shared && \
make && \
make install && \
ln -s /usr/local/bin/python3 /usr/bin/python && \
ln -s /usr/local/bin/pip3 /usr/bin/pip
# # Install FFmpeg, GStreamer, and reqs for custom plugins
RUN apt update && apt upgrade -y && apt install -y \
ffmpeg \
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
libgstreamer-plugins-bad1.0-dev \
libhdf5-dev \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-base-apps \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly \
gstreamer1.0-libav \
gstreamer1.0-tools \
gstreamer1.0-x \
gstreamer1.0-alsa \
gstreamer1.0-gl \
gstreamer1.0-gtk3 \
gstreamer1.0-qt5 \
gstreamer1.0-pulseaudio \
graphviz \
python3-gi \
python3-gst-1.0 \
libgirepository1.0-dev \
cmake \
python-gi-dev \
libcairo2-dev \
ninja-build \
git \
flex \
bison
WORKDIR /opt
RUN pip install pycairo pygobject meson pipenv
RUN GSTREAMER_VERSION=$(gst-launch-1.0 --version | grep version | tr -s ' ' '\n' | tail -1) \
&& wget https://gstreamer.freedesktop.org/src/gst-python/gst-python-$GSTREAMER_VERSION.tar.xz --no-check-certificate \
&& tar -xJf gst-python-$GSTREAMER_VERSION.tar.xz \
&& rm gst-python-$GSTREAMER_VERSION.tar.xz \
&& cd gst-python-$GSTREAMER_VERSION \
&& PREFIX=$(dirname $(dirname $(which python))) \
&& meson build --prefix=$PREFIX \
&& ninja -C build \
&& ninja -C build install \
&& mv $(dirname $(find /usr -name "libgstpython.so")) /usr/local/lib
# Install other dependencies
ENV GST_PLUGIN_PATH=/usr/local/lib/gstreamer-1.0