WSL GStreamer
Installation
sudo apt-get install gstreamer1.0-tools gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-libav gstreamer1.0-vaapi
gst-inspect-1.0 | grep vaapi
gst-inspect-1.0 | grep nvcodec
export LIBVA_DRIVER_NAME=d3d12
export MESA_D3D12_DEFAULT_ADAPTER_NAME=INTEL
export MESA_D3D12_DEFAULT_ADAPTER_NAME=NVIDIA
export GST_GL_WINDOW=x11
export GST_GL_WINDOW=wayland
# Intel and NVIDIA VA-API
gst-launch-1.0 -v videotestsrc num-buffers=300 ! video/x-raw,width=1920,height=1080 ! vaapipostproc ! vaapih264enc ! filesink location=~/wsl_test.h264
# NVIDIA NVENC
gst-launch-1.0 -v videotestsrc num-buffers=300 ! video/x-raw,width=1920,height=1080 ! cudaupload ! nvh264enc ! filesink location=~/wsl_test.h264
# Intel and NVIDIA VA-API
gst-launch-1.0 filesrc location=~/wsl_test.h264 ! h264parse ! vaapih264dec ! autovideosink
# NVDIA NVDEC
gst-launch-1.0 filesrc location=~/wsl_test.h264 ! h264parse ! nvh264dec ! autovideosink
Development
sudo apt install git make cmake meson ninja-build pkg-config build-essential
sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev libgstreamer-plugins-bad1.0-dev indent
mamba create -n gst
mamba activate gst
mamba install git make cmake pkg-config meson ninja
git clone https://gitlab.freedesktop.org/gstreamer/gstreamer.git
cd gstreamer
git checkout 1.24.10
sudo cp scripts/gst-indent /usr/local/bin/
cd subprojects/gst-plugins-bad/tools/
./gst-project-maker my_project
cd gst-my_project
meson setup builddir
meson compile -C builddir
BASE_CLASS=basetransform
./gst-element-maker my_element $BASE_CLASS