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-studio: 28.0.3 (additional to 27.x) #194578
Conversation
Builds now successfully but does not start with this error: |
I think the problem is, that the plugin folder is cleared. At least i got it somehow working with the following hackish diff (which breaks the nixos plugin system for obs, it's only for demonstration!) index 5303991f1fb..6db7c5239e7 100644
--- a/pkgs/applications/video/obs-studio/wrapper.nix
+++ b/pkgs/applications/video/obs-studio/wrapper.nix
@@ -22,16 +22,16 @@ symlinkJoin {
wrapCommandLine = [
"wrapProgram"
"$out/bin/obs"
- ''--set OBS_PLUGINS_PATH "${pluginsJoined}/lib/obs-plugins"''
- ''--set OBS_PLUGINS_DATA_PATH "${pluginsJoined}/share/obs/obs-plugins"''
+ ''--set OBS_PLUGINS_PATH "${obs-studio}/lib/obs-plugins"''
+ ''--set OBS_PLUGINS_DATA_PATH "${obs-studio}/share/obs/obs-plugins"''
] ++ pluginArguments;
in ''
${concatStringsSep " " wrapCommandLine}
# Remove unused obs-plugins dir to not cause confusion
- rm -r $out/share/obs/obs-plugins
+ # rm -r $out/share/obs/obs-plugins
# Leave some breadcrumbs
- echo 'Plugins are at ${pluginsJoined}/share/obs/obs-plugins' > $out/share/obs/obs-plugins-README
+ # echo 'Plugins are at ${pluginsJoined}/share/obs/obs-plugins' > $out/share/obs/obs-plugins-README
'';
inherit (obs-studio) meta; Please also note that with obs version 28, there is no need for the external websocket plugin. i did not manage to build version 5.0.2 of it, but it's also not needed, because it is now included in obs (see https://github.com/obsproject/obs-studio/releases/tag/28.0.0):
So i think Sadly my nixos skills are not good enough to really help, but i hope this information saves you some time. |
Thanks for your research and pointing this out! It seems, that we can not continue to drop the shipped plugins like before (?), maybe we can do something like splitting the plugin-files from the obs-build to include them in the combined-plugins output. But for now I have no idea how to archive this. For the websocket-plugin: I also ran into this but forget to add it here as I dropped the plugins at some point for now until OBS28 runs (somehow). |
obs doesn't pick up its built-in plugins, setting OBS_PLUGINS_PATH to ./result/lib/obs-plugins (same with OBS_PLUGINS_DATA_PATH and share) makes startup succeed. Trying to figure out how to properly fix that. Also we should consider building it with Qt 6, which may cause plugin incompatibilities however. Edit v2: Found it:
The issue is that obs assumes that CMAKE_INSTALL_LIBDIR is a relative directory (usually, just Thinking of a solution |
Checked the used dependencies, we missing @raphaelr Thanks for looking into and helping out 🥇 |
i also wanted to share my latest success: i got obs working with an external plugin: BenediktSeidl@b4c7471 but the non wrapped version of obs will exit with an error, you described above. also |
It's fine, doesn't exist/not needed in Qt6 For Qt6, in all-packages.nix you need to replace |
Updated PR to build with qt6, added temporary fix (#194578 (comment)) to be able to run output for testing |
Re: obs-plugins, Raphael has the problem right. obs-nix.c expects a relative OBS_PLUGIN_DESTINATION at runtime, but we need it to be absolute at build time. I'd consider something like this: https://github.com/miangraham/nixpkgs/commit/286080568c51f5f3d3e3a06a1c8322bf15c98cd5 Leave OBS_PLUGIN_DESTINATION unchanged on the build side, but give the runtime side what it expects by pulling the prefix out of the string passed from cmake into obsconfig.h's #define. Slightly bigger change than one-line patching obs-nix.c, but future-proofs against other C code additions with similar expectations. New variable used just for this at build time, as seen from cmake:
I've built but not runtime tested the above because my wayland system dumps core from Qt before reaching the affected areas, which will be another bug to fix at some point. Should be testable from X. |
Updated PR to add |
Tested on 31b147d: info: ---------------------------------
info: Loaded Modules:
...
info: linux-jack.so
...
info: ---------------------------------
info: ------------------------------------------------
info: Loaded scenes:
info: - scene 'Main':
info: - source: 'obs music in' (jack_output_capture)
info: - monitoring: monitor and output
info: - source: 'obs mic in' (jack_output_capture)
info: - monitoring: monitor and output
...
info: ------------------------------------------------ It works! 🎉 Qt is still sad: info: Qt Version: 5.15.5 (runtime), 5.15.5 (compiled) Current PR is missing at least the |
Updated PR to build against Qt6 again (sorry amneded before so rebase removed the changes), removed cherry-picked dependencies as merged now. Retested it with "looking-glass-obs" and works for me :) |
Do it in this PR; if you do it in a new PR master becomes broken (no obs-websocket but also no OBS 28). |
Great to see a new OBS coming in. 👍 Can you rebase this PR? Otherwise, the build runs into:
|
I've tested it with some light recording workloads and it looks good. Fiddling with a V4L2 source made by Gnome Session crash, but that doesn't seem like it should be OBS's fault. The Gnome Shell crash is this one and it's supposedly fixed in GNOME 43: https://gitlab.gnome.org/GNOME/mutter/-/issues/2433 (I'm running 42.4) |
Done in separate commit within this PR
Rebased on current master |
obs-studio looks good; plugin status (nix build .#obs-studio-plugins.name): https://obsproject.com/kb/obs-studio-28-plugin-compatibility
This is just an overview of the current status, not neccessarily a "this MUST be fixed" list. |
obs-ndi non-compat tracking issue: obs-ndi/obs-ndi#745 Upstream is broken against v28 until they finalize a fix. Bleeding edge packagers like Alpine-edge, Arch, and RPMFusion seem to have rolled forward without it. It's also got users in practice--see activity on the issue above for an idea. Assuming we don't plan to wait for it, flag as broken until they have a new release and consider user impact as a factor in merge timing relative to 22.11. |
Since many plugins aren't ported yet and the changes to the derivation seem fairly minimal, could we keep around both versions? |
Sounds like a good idea, will try to have a look at it but mighty take some days (maybe the weekend). |
I've had quiet a look today but as there are fundamental changes like |
I'm not an expert in this but it seems As for version selection, I'd use a pattern similar to Emacs. A generic.nix with a function that takes version and hash and returns the existing package function. Then add versioned files that simply call generic.nix with a certain version. (You could do the same in a single file, that's preference.) In the derivation we can then check against the version for optional dependencies etc. using |
Thanks @Atemu again for your help - I'm not quite sure if it's fully the solution you proposed but there were some issues with importing additional packages in 27/28.nix and appending to buildInputs so I came across this solution in a library and got it adapted and working. Both versions 27.x and 28.x are building and possible to launch without errors. One thing I'm unsure about, how to handle/proceed with the plugins as there are sometimes different build/things for LibObs etc. needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we will have both versions available in nixpkgs, let's merge this.
Description of changes
Depends on #194572 #194518 (✅ merged)
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes