Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

obs-v4l2sink: init at unstable-20181012 #84153

Merged
merged 1 commit into from Apr 17, 2020

Conversation

colemickens
Copy link
Member

Motivation for this change

If I recall correctly I started this, couldn't get it built, @grahamc got it built, couldn't get it working.

I got it working. YUY2 format, exclusive_caps=1 with v4l2loopback. I flipped the video on hte OBS stage, but I think that Jitsi mirror your local video, so this is probably actually the wrong thing to do.

Here's a screenshot of my Sway desktop being captured in OBS-Studio (specifically, this build: obsproject/obs-studio#2484) and then shown in a Jit.si Meet call.

output

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@colemickens colemickens changed the title obs-v4l2sink: init obs-v4l2sink: init at unstable-20181012 Apr 3, 2020
@grahamc
Copy link
Member

grahamc commented Apr 17, 2020

I setup my system like this:

{
  boot = {
    kernelPackages = pkgs.linuxPackages_latest;
    extraModulePackages = [
      (pkgs.linuxPackages_latest.v4l2loopback.overrideAttrs ({ ... }: {
        src = pkgs.fetchFromGitHub {
          owner = "umlaeute";
          repo = "v4l2loopback";
          # master 2020-04-17
          rev = "10b1c7e6bda4255fdfaa187ce2b3be13433416d2";
          sha256 = "0xsn4yzj7lwdg0n7q3rnqpz07i9i011k2pwn06hasd45313zf8j2";
        };
      }))
    ];
    extraModprobeConfig = ''
      options v4l2loopback exclusive_caps=1 video_nr=9 card_label="obs"
    '';
  };
}

I then rebooted to be sure I got all the latest, greatest kernely goodness and ran sudo modprobe v4l2loopback exclusive_caps=1 video_nr=9 card_label="obs"

Then, I merged this PR in to master locally, built this plugin and obs-studio:

nix-build . -A obs-v4l2sink -A obs-studio

and linked the plugin in to place:

ln -s $(realpath ./result)/share/obs/obs-plugins/v4l2sink/ ~/.config/obs-studio/plugins/v4l2sink

and then ran obs:

./result-2/bin/obs

and

image

@grahamc grahamc merged commit b76e3ea into NixOS:master Apr 17, 2020
@notpeelz notpeelz mentioned this pull request Apr 21, 2020
10 tasks
@colemickens colemickens deleted the nixpkgs-obs-v4lsink branch December 30, 2022 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants