Well, I’ve built gstreamer 1.19.2 and 1.22.5, but av1parse doesn’t work with hlssink (and hlssink2 refuses to receive av1).
However, using av1parse allows streaming with TCP and client can connect at any time.
For reference, this is the script I’ve been using. It keeps the original gstreamer unmodified, it installs in user filesystem:
#!/bin/sh
set -x
#VERSION=1.19.2
VERSION=1.22.5
mkdir gst_$VERSION
cd gst_$VERSION
PREFIX=$(pwd)
wget https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-$VERSION.tar.xz --no-check-certificate
wget https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-$VERSION.tar.xz --no-check-certificate
wget https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-$VERSION.tar.xz --no-check-certificate
wget https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-$VERSION.tar.xz --no-check-certificate
wget https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-$VERSION.tar.xz --no-check-certificate
for a in `ls -1 *.tar.*`; do tar -xf $a; done
# install dependancies
sudo apt install -y build-essential dpkg-dev flex bison autotools-dev automake autopoint libtool libgstreamer1.0-dev libxv-dev libasound2-dev libtheora-dev libogg-dev libvorbis-dev libbz2-dev libv4l-dev libvpx-dev libjack-jackd2-dev libsoup2.4-dev libpulse-dev faad libfaad-dev libgl1-mesa-dev libgles2-mesa-dev libx264-dev libmad0-dev gobjc-9 libmount-dev libglib2.0-dev
pip3 install --upgrade meson
# GStreamer framework
cd gstreamer-$VERSION
meson setup -Dprefix=$PREFIX/out build
ninja -C build install
cd ..
# Adjust environment for the new gstreamer framework
export PATH=$PREFIX/out/bin:$PATH
export LD_LIBRARY_PATH=$PREFIX/out/lib/aarch64-linux-gnu/:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=$PREFIX/out/lib/aarch64-linux-gnu/pkgconfig:$PKG_CONFIG_PATH
#Base
cd gst-plugins-base-$VERSION
meson setup -Dprefix=$PREFIX/out build
ninja -C build install
cd ..
#Good
cd gst-plugins-good-$VERSION
meson setup -Dprefix=$PREFIX/out build
ninja -C build install
cd ..
#Bad
cd gst-plugins-bad-$VERSION
meson setup -Dprefix=$PREFIX/out build
ninja -C build install
cd ..
# Ugly
cd gst-plugins-ugly-$VERSION
meson setup -Dprefix=$PREFIX/out build
ninja -C build install
cd ..
# Copy NVIDIA binaries
cp /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnv* $PREFIX/out/lib/aarch64-linux-gnu/gstreamer-1.0/
chmod u+x $PREFIX/out/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnv*
if [ -d /etc/alternatives/deepstream-plugins/ ]; then
ln -s /etc/alternatives/deepstream-plugins/ $PREFIX/out/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream
fi
# First clear gstreamer cache
rm ~/.cache/gstreamer-1.0/registry.aarch64.bin
# add new plugins path
export GST_PLUGIN_PATH=$PREFIX/out/lib/aarch64-linux-gnu/gstreamer-1.0
gst-inspect-1.0 --version
gst-inspect-1.0 -b
For using it, you would set the environment with:
# Adjust to your install path and version
export PREFIX=/home/nvidia/Desktop/gstreamer-1.0/gst_1.22.5
export PATH=$PREFIX/out/bin:$PATH
export LD_LIBRARY_PATH=$PREFIX/out/lib/aarch64-linux-gnu/:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=$PREFIX/out/lib/aarch64-linux-gnu/pkgconfig:$PKG_CONFIG_PATH
Then you can stream AV1 over TCP with:
gst-launch-1.0 videotestsrc ! nvvidconv ! nvv4l2av1enc idrinterval=15 ! queue ! av1parse ! tcpserversink host=127.0.0.1
and receive with:
gst-launch-1.0 tcpclientsrc host=127.0.0.1 ! av1parse ! nvv4l2decoder ! queue ! nvvidconv ! autovideosink