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: gstreamer plugin #94067

Closed
wants to merge 3 commits into from
Closed

obs: gstreamer plugin #94067

wants to merge 3 commits into from

Conversation

yurkobb
Copy link
Contributor

@yurkobb yurkobb commented Jul 28, 2020

Motivation for this change

Add the obs-gstreamer OBS plugin (useful for things like attaching sources OBS doesn't support natively, but gstreamer does, like firewire (H)DV cameras, among other things).

Need help with

Currently there are two issues with path lookup:

  1. obs doesn't know about plugins outside its own package - can be worked around by ln -s ~/.nix-profile/lib/obs-plugins/obs-gstreamer.so ~/.config/obs-studio/plugin/obs-gstreamer/bin/64bit/
  2. obs doesn't know where to look for gstreamer plugins, required by this package. Can be worked around by looking up the store path of gstreamer and gstreamer-plugins and doing
export GST_PLUGIN_SYSTEM_PATH_1_0=/nix/store/789ac60d8hdyhgbi5arx26m34zp410ik-gst-plugins-base-1.16.2/lib/:/nix/store/2j71zkvld1r8vhyk44xilcid9sybjpqw-gstreamer-1.16.2/lib

I am not sure if #1 needs patching OBS to support loading plugins from the system and user profiles (at least i can't find any environment variables to tweak by searching for getenv calls in its source code).

About #2 - have no idea how to fix this... Still a nixpkgs newbie...

(cc @jb55 @MP2E from default.nix maintainers).

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.

@yurkobb
Copy link
Contributor Author

yurkobb commented Aug 9, 2020

Hm, since the workaround No. 2 is actually similar with other system/user-wide plugins like LV2, and No. 1 applies to any obs plugin, not just this one, I think I'm going to submit this as is.

@yurkobb yurkobb marked this pull request as ready for review August 9, 2020 23:02
@@ -8919,6 +8919,16 @@
githubId = 687198;
name = "Yuri Aisaka";
};
yurkobb = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put this into a separate commit with the message maintainers: add yurkobb.

sha256 = "1szfx5p2lb953blzw7prfd0nngjlwv2wn7jmnwvlssc9ci6jl6s8";
};

nativeBuildInputs = [ meson ninja pkgconfig ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
nativeBuildInputs = [ meson ninja pkgconfig ];
nativeBuildInputs = [ meson ninja pkg-config ];

, fetchFromGitHub
, gstreamer
, gst-plugins-base
, pkgconfig
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
, pkgconfig
, pkg-config

meta = with lib; {
description = "GStreamer OBS Studio plugin";
homepage = "https://github.com/fzwoch/obs-gstreamer";
license = licenses.gpl2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plus or Only?

@jansol
Copy link
Contributor

jansol commented Jun 5, 2021

This should benefit nicely from #125308

@yurkobb
Copy link
Contributor Author

yurkobb commented Jun 5, 2021

This should benefit nicely from #125308

Oh, that's great news and will make using obs with plugins much easier! P.S. Regarding this PR, someone has already packaged obs-gstreamer in the meantime, so I think it can be closed.

@yurkobb yurkobb closed this Jun 5, 2021
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

5 participants