PipeWire: Difference between revisions

From NixOS Wiki
imported>Yaymukund
Added PipeWire
 
imported>Fufexan
m Fixed config example
Line 31: Line 31:
services.pipewire = {
services.pipewire = {
   config.pipewire = {
   config.pipewire = {
     "properties" = {
     "context.properties" = {
       #"link.max-buffers" = 64;
       #"link.max-buffers" = 64;
       "link.max-buffers" = 16; # version < 3 clients can't handle more than this
       "link.max-buffers" = 16; # version < 3 clients can't handle more than this

Revision as of 10:40, 24 April 2021

PipeWire is a new low-level multimedia framework. It aims to offer capture and playback for both audio and video with minimal latency and support for PulseAudio-, JACK-, ALSA- and GStreamer-based applications.

The daemon based on the framework can be configured to be both an audio server (with PulseAudio and JACK features) and a video capture server.

Enabling PipeWire

Add to your configuration:

# Remove sound.enable or turn it off if you had it set previously, it seems to cause conflicts with pipewire
#sound.enable = false;

# rtkit is optional but recommended
security.rtkit.enable = true;
services.pipewire = {
  enable = true;
  alsa.enable = true;
  alsa.support32Bit = true;
  pulse.enable = true;
  # If you want to use JACK applications, uncomment this
  #jack.enable = true;

  # use the example session manager (no others are packaged yet so this is enabled by default,
  # no need to redefine it in your config for now)
  #media-session.enable = true;
};

Some useful knobs if you want to finetune or debug your setup:

services.pipewire = {
  config.pipewire = {
    "context.properties" = {
      #"link.max-buffers" = 64;
      "link.max-buffers" = 16; # version < 3 clients can't handle more than this
      "log.level" = 2; # https://docs.pipewire.org/#Logging
      #"default.clock.rate" = 48000;
      #"default.clock.quantum" = 1024;
      #"default.clock.min-quantum" = 32;
      #"default.clock.max-quantum" = 8192;
  };
};

See also