make root

build gst raspivid

apt install git autoconf automake libtool pkg-config libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libraspberrypi-dev gstreamer-tools gstreamer1.0-omx
cd /home/pi
git clone https://github.com/thaytan/gst-rpicamsrc.git
cd gst-rpicamsrc
autoreconf -i
autoconf
./configure
make -j4
sudo make install

build gst srt

build lib srt

apt install cmake-data libjsoncpp1 librhash0 libuv1 tcl8.6 tclsh cmake libssl-dev
git clone https://github.com/Haivision/srt.git
cd srt
git checkout tags/v1.4.1
./configure
make -j4
sudo make install

build gst srt (build gst bad with srt support)

enable src packages in /etc/apt/sources.list
sudo apt build-dep gstreamer1.0-plugins-bad
sudo apt install meson ninja-build
git clone https://github.com/GStreamer/gst-plugins-bad.git
git checkout -b 1.14.5 1.14.5
meson build
ninja -C build
sudo cp build/ext/srt/libgstsrt.so /usr/lib/arm-linux-gnueabihf/gstreamer-1.0/

build gst-instruments

sudo apt install valac meson ninjac
git clone https://github.com/kirushyk/gst-instruments.git
cd gst-insturments
meson build
ninja -C build
sudo ninja -C build install

ffmpeg

based on https://gist.github.com/jjangsangy/058456fe2d04e3c5f6107d62b60542e3

make sure du build libs not part of raspbian according to the gist above or remove them from configure.

./configure --extra-ldflags="-latomic" --extra-cflags="-I/usr/local/include" --extra-ldflags="-L/usr/local/lib" --extra-libs="-lpthread -lm" --arch=armhf --enable-gmp --enable-gpl --enable-libass --enable-libdav1d --enable-libdrm --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libssh --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-mmal --enable-nonfree --enable-omx --enable-omx-rpi --enable-version3 --target-os=linux --enable-pthreads --enable-openssl --enable-hardcoded-tables --enable-libsrt --enable-libv4l2