Skip to content

Fork OBS Studio to enable zero-copy KMSGrab capture

License

Notifications You must be signed in to change notification settings

scaledteam/obs-studio

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Goal of this fork to add kmsgrab support

KMSGrab is a zero-copy method of capturing screen in GNU/Linux. This plugin adds kmsgrab functionality into OBS Studio.

Most of the code made by w23 (https://github.com/w23/) , scaledteam fixed bug with frame drops, fixed losting capture after switching between fullscreen windows and ported it into latest OBS Studio.

Important notes while building

Since dmabuf (kmsgrab) capture require root to work, to make it usable from user account you need to add special caps to it:

sudo setcap cap_sys_admin+ep /usr/local/bin/obs

While building you can encounter strange problem,

CMake Warning at CMakeLists.txt:15 (project): VERSION keyword not followed by a value or was followed by a value that expanded to nothing.

To fix it you need to add version number manually cmake .. -DOBS_VERSION_OVERRIDE=28.1.0-kmsgrab

General guide to building

git clone https://github.com/scaledteam/obs-studio

mkdir build

cd build

cmake .. -DENABLE_WEBSOCKET=OFF -DENABLE_VST=OFF -DENABLEVLC=OFF -DENABLE_BROWSER=OFF -DENABLE_AJA=OFF -DOBS_VERSION_OVERRIDE=28.1.0-kmsgrab

make -j$(nproc)

sudo checkinstall --default --fstrans=no --backup=no --pkgversion="$(date +%Y%m%d)" --deldoc=yes --pkgname=obs-studio-local-kmsgrab

sudo ldconfig

sudo setcap cap_sys_admin+ep /usr/local/bin/obs

My personal setup

I use Debian Testing (2022-11-04) with Gnome and Wayland (previously used with X11), obs-studio compiled with this parameters:

cmake .. -DCMAKE_C_FLAGS=-march=native -DCMAKE_CXX_FLAGS=-march=native -DENABLE_WEBSOCKET=OFF -DENABLE_VST=OFF -DENABLE_VLC=OFF -DENABLE_AJA=OFF -DENABLE_SCRIPTING=OFF -DENABLE_SCRIPTING_LUA=OFF -DENABLE_SCRIPTING_PYTHON=OFF -DENABLE_DECKLINK=OFF -DOBS_VERSION_OVERRIDE=28.1.0-kmsgrab -DCCACHE_SUPPORT=OFF -DENABLE_PIPEWIRE=OFF -DENABLE_WHATSNEW=OFF -DENABLE_SPEEXDSP=OFF -DENABLE_BROWSER=OFF

And similar setup with Browser:

cmake .. -DCMAKE_C_FLAGS=-march=native -DCMAKE_CXX_FLAGS=-march=native -DENABLE_WEBSOCKET=OFF -DENABLE_VST=OFF -DENABLE_VLC=OFF -DENABLE_AJA=OFF -DENABLE_SCRIPTING=OFF -DENABLE_SCRIPTING_LUA=OFF -DENABLE_SCRIPTING_PYTHON=OFF -DENABLE_DECKLINK=OFF -DOBS_VERSION_OVERRIDE=28.1.0-kmsgrab -DCCACHE_SUPPORT=OFF -DENABLE_PIPEWIRE=OFF -DENABLE_WHATSNEW=OFF -DENABLE_SPEEXDSP=OFF -DCEF_ROOT_DIR=/home/scaled/git/obs-build-dependencies/cef_binary_5060_linux64

OBS Studio Build Status - GitHub Actions OBS Studio Translation Project Progress OBS Studio Discord Server

What is OBS Studio?

OBS Studio is software designed for capturing, compositing, encoding, recording, and streaming video content, efficiently.

It's distributed under the GNU General Public License v2 (or any later version) - see the accompanying COPYING file for more details.

Quick Links

Contributing

About

Fork OBS Studio to enable zero-copy KMSGrab capture

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 54.1%
  • C++ 38.6%
  • CMake 3.0%
  • Objective-C++ 1.5%
  • Objective-C 1.3%
  • Shell 0.7%
  • Other 0.8%