Post

Compile and run obs source code on wsl2

alt text

Trying to learn about video development, and found that obs is open-sourced.

This post details the process of compiling and run the source code on wsl2.

The wsl2 uses ubuntu24.04

Steps

  1. Install the prerequisites
  2. Install nvenc sudo apt install libffmpeg-nvenc-dev(This will resolve the Could NOT find FFnvcodec error. -DENABLE_NATIVE_NVENC=OFF doesn’t work)
  3. Generate build environment cmake -S . -B build -G Ninja -DENABLE_AJA=0 -DENABLE_PIPEWIRE=OFF -DENABLE_WEBRTC=0 -DQT_VERSION=6
  4. Run cmake --build build
  5. Run cmake --build build --target package
  6. Run sudo apt-mark hold obs-studio
  7. Run sudo apt install build/obs-studio-*.deb
  8. Run sudo ldconfig(This will resolve error while loading shared libraries: libobs-frontend-api.so)
  9. Run obs
This post is licensed under CC BY 4.0 by the author.