OBS virtual camera broken in recent unstable

My OBS virtual camera failed to start after an update last week. I did the usual thing and just rolled back to the previous generation until I had time to look further.

It turns out that there was a v4l2loopback update from 0.13.2 to 0.15, and this is a breaking change for OBS. OBS has addressed this in version 31.1, but that’s yet to be released.

The v4l2loopback commit suggests that it is in turn needed to build newer kernels, so just rolling that back for everyone until OBS updates isn’t quite so easy.

So I did this override instead…

  boot.extraModulePackages = [
    (pkgs.linuxPackages.v4l2loopback.overrideAttrs
      ({
        version = "0.13.2-manual";
        src = (pkgs.fetchFromGitHub {
          owner = "umlaeute";
          repo = "v4l2loopback";
          rev = "v0.13.2";
          hash = "sha256-rcwgOXnhRPTmNKUppupfe/2qNUBDUqVb3TeDbrP5pnU=";
        });
      })
    )
  ];

The version is just a cheap hack to avoid pulling in the kernel to get the version in this particular module.

Have added the same note to the commit, but thought I’d post it here to make it easier to find.