Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 41 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
# OBS Linux Vulkan/OpenGL game capture
# OBS Linux Vulkan/OpenGL Game Capture

OBS plugin for Vulkan/OpenGL game capture on Linux.

AUR: [obs-vkcapture-git](https://aur.archlinux.org/packages/obs-vkcapture-git/)
## Installation

**Flatpak:**
* OBS plugin: [com.obsproject.Studio.Plugin.OBSVkCapture](https://github.com/flathub/com.obsproject.Studio.Plugin.OBSVkCapture)
* Capture tools: [org.freedesktop.Platform.VulkanLayer.OBSVkCapture](https://github.com/flathub/org.freedesktop.Platform.VulkanLayer.OBSVkCapture)
### AUR
64 bit: [obs-vkcapture-git](https://aur.archlinux.org/packages/obs-vkcapture-git/)

## About Flatpak
If you use Flatpak OBS, you need to install Flatpak *OBS plugin*.
If you use Flatpak Steam, you need to install Flatpak *Capture tools* to be able to capture games running inside Flatpak Steam runtine.
32 Bit: [lib32-obs-vkcapture-git](https://aur.archlinux.org/packages/lib32-obs-vkcapture-git/)

For capturing games outside Flatpak runtime, you need native build regardless of if you are using Flatpak OBS or not.
### Flatpak
```flatpak install com.obsproject.Studio.Plugin.OBSVkCapture```

## Dependencies
```flatpak install org.freedesktop.Platform.VulkanLayer.OBSVkCapture```

#### OBS plugin: [com.obsproject.Studio.Plugin.OBSVkCapture](https://github.com/flathub/com.obsproject.Studio.Plugin.OBSVkCapture)

* This ONLY gives the plugin.
* You will need to install native ```obs-vkcapture``` if you want to capture native games.
* You will need to install Flatpak ```Capture Tools``` if you want to capture Flatpak games.

#### Capture Tools: [org.freedesktop.Platform.VulkanLayer.OBSVkCapture](https://github.com/flathub/org.freedesktop.Platform.VulkanLayer.OBSVkCapture)

* This is needed for Flatpak games. It doesn't matter whether you are running Flatpak OBS or native OBS.

### Manual

#### Dependencies

* cmake
* libobs
Expand All @@ -26,24 +38,39 @@ For capturing games outside Flatpak runtime, you need native build regardless of
* libwayland-client (optional)
* wayland-scanner (optional)

## Building

To install system-wide you need to use ```sudo make install```
```
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
make && make install
```

## Usage

1. Add `Game Capture` to your OBS scene.
2. Start the game with capture enabled `obs-gamecapture %command%`.
3. (Recommended) Start the game with only Vulkan capture enabled `env OBS_VKCAPTURE=1 %command%`.
2. Start the game with capture enabled:

1. If Vulkan, use ```env OBS_VKCAPTURE=1 <APP>```
2. If OpenGL, use ```obs-gamecapture <APP>```
3. If obs-gamecapture doesn't work on Flatpak for OpenGL, try:

``` flatpak run --env=LD_PRELOAD=/usr/lib/extensions/vulkan/OBSVkCapture/lib/x86_64-linux-gnu/libobs_glcapture.so <APP>```

* Replace ```<APP>``` with the application you are trying to start.
* If using Steam launch options, replace ```<APP>``` with ```%command%```

## Troubleshooting

**NVIDIA**

Driver version >= 515.43.04 and `nvidia-drm.modeset=1` kernel parameter are required. In Wayland session make sure OBS is running on Wayland and not XWayland.

**OpenGL game crashing or not capturing video**

A potential workaround for this is to use Zink for converting OpenGL to Vulkan and then using Vulkan capture instead. May cause issues or reduced framerates with certain games/programs.

```env MESA_LOADER_DRIVER_OVERRIDE=zink OBS_VKCAPTURE=1 <APP>```

**No Game Capture source available in OBS 27**

If you are on X11, make sure you run OBS with EGL enabled: `OBS_USE_EGL=1 obs`.