Skip to content

Instantly share code, notes, and snippets.

@Sean-Der
Last active February 1, 2023 16:47
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save Sean-Der/2cb7656db4002fea6b20ff7840863b96 to your computer and use it in GitHub Desktop.
Save Sean-Der/2cb7656db4002fea6b20ff7840863b96 to your computer and use it in GitHub Desktop.
GStreamer AV1 Dockerfile and example pipeline
FROM debian:sid
ENV DISPLAY :0
RUN echo 'deb http://mirrors.kernel.org/debian/ sid main contrib non-free\n\
deb-src http://mirrors.kernel.org/debian/ sid main contrib non-free\n'\
>> /etc/apt/sources.list
RUN apt-get -y update
RUN apt-get -y install git build-essential bison flex cmake
RUN apt-get -y build-dep gstreamer1.0-libav gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly
RUN cd /usr/src && git clone https://aomedia.googlesource.com/aom && cd aom && mkdir local_build && cd local_build && cmake .. -DBUILD_SHARED_LIBS=ON && make install -j8
RUN cd /usr/src && git clone git://anongit.freedesktop.org/git/gstreamer/gstreamer && cd gstreamer && ./autogen.sh --disable-gtk-doc && make -j8
install
RUN cd /usr/src && git clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-base && cd gst-plugins-base && ./autogen.sh --disable-gtk-doc && make -j8
install
RUN cd /usr/src && git clone https://github.com/Sean-Der/gst-plugins-good.git && cd gst-plugins-good && ./autogen.sh --disable-gtk-doc && make -j8
install
RUN cd /usr/src && git clone https://github.com/Sean-Der/gst-plugins-bad.git && cd gst-plugins-bad && ./autogen.sh --disable-gtk-doc && make -j8
install
RUN cd /usr/src && git clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-ugly && cd gst-plugins-ugly && ./autogen.sh --disable-gtk-doc && make -j8
install
RUN ldconfig
CMD /bin/bash
//On your host machine, run this in the directory your saved the above Dockerfile
docker build -t gstreamer .
docker run -it --net=host -e DISPLAY -v $HOME/.Xauthority:/root/.Xauthority gstreamer
//Inside your docker contaier (after the Docker run has completed)
gst-launch-1.0 videotestsrc pattern=ball ! video/x-raw,height=100,width=100 ! av1enc ! av1dec ! identity silent=true ! autovideosink sync=false -v
@GabrieleRisso
Copy link

Hello, well done!

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