OBS Studio: Difference between revisions
m Added information about the OBS module added to NixOS in 24.11. |
added disclaimer for missing hardware acceleration options |
||
(One intermediate revision by the same user not shown) | |||
Line 12: | Line 12: | ||
programs.obs-studio = { | programs.obs-studio = { | ||
enable = true; | enable = true; | ||
# optional Nvidia hardware acceleration | |||
package = ( | |||
pkgs.obs-studio.override { | |||
cudaSupport = true; | |||
} | |||
); | |||
plugins = with pkgs.obs-studio-plugins; [ | plugins = with pkgs.obs-studio-plugins; [ | ||
wlrobs | wlrobs | ||
obs-backgroundremoval | obs-backgroundremoval | ||
obs-pipewire-audio-capture | obs-pipewire-audio-capture | ||
obs-vaapi #optional AMD hardware acceleration | |||
obs-gstreamer | |||
obs-vkcapture | |||
]; | ]; | ||
}; | }; | ||
Line 23: | Line 34: | ||
or by wrapping the package with <code>wrapOBS</code>: | or by wrapping the package with <code>wrapOBS</code>: | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix">environment.systemPackages = [ | ||
environment.systemPackages = [ | |||
(pkgs.wrapOBS { | (pkgs.wrapOBS { | ||
plugins = with pkgs.obs-studio-plugins; [ | plugins = with pkgs.obs-studio-plugins; [ | ||
Line 30: | Line 40: | ||
obs-backgroundremoval | obs-backgroundremoval | ||
obs-pipewire-audio-capture | obs-pipewire-audio-capture | ||
obs-vaapi #optional AMD hardware acceleration | |||
obs-gstreamer | |||
obs-vkcapture | |||
]; | ]; | ||
}) | }) | ||
]; | ];</syntaxhighlight>'''Package collision''': Including both <code>obs-studio</code> and <code>(pkgs.wrapOBS {...</code> in <code>environment.systemPackages</code> will result in a package collision; if plugins are needed, only include the "wrapped" version, which sets the plugins directory to include Nix-managed plugins (see [https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/video/obs-studio/wrapper.nix pkgs/applications/video/obs-studio/wrapper.nix]. | ||
</syntaxhighlight> | |||
'''Missing hardware acceleration''': Sometimes you need to set "Output Mode" to Advanced in settings Output tab to see the hardware accelerated Video Encoders options. | |||
=== Using the Virtual Camera === | === Using the Virtual Camera === |