-
Notifications
You must be signed in to change notification settings - Fork 52
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
stderr output from native app ff2mpv: libswresample: 4.10.100 -> 4.7.100 #109
Comments
Thanks for the report. Can you send an example URL that fails to play? I strongly suspect that this is a distribution level problem (I don't know much about NixOS, but I know they do weird things to paths that Firefox native messaging extensions may depend on). Another possible candidate: https://bbs.archlinux.org/viewtopic.php?id=287741 |
All of them fail to play, but specifically through the extension, MPV itself works just fine, as does yt-dlp. Doesn't matter if it's from Youtube, Odysee, or PornHub. I don't entirely see how the forum post you linked to is related. |
I didn't go through it fully, it's just another recent example of someone having issues with MPV with a similar Can you share a bit more about your host? What's your |
No, it behaves the same in a terminal or through the default launcher. I can provide my nix config if that might help, but if you don't understand them, this may not help. I HAD been installing your script through this https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/applications/misc/ff2mpv/default.nix#L29 but it didn't seem to work at all using it, and just running the install.sh worked fine until recently. |
Got it. I'm a bit stumped then: some users have previously reported problems where Does anything stand out in your system logs? The only other thing I can think of is some sandboxing change that kills native extensions (this has been a problem for Fedora users I believe, not sure if it applies to NixOS).
Others might have the same issue, so IMO it's worth pasting here for indexing purposes. |
NixOS doesn't necessarily sandbox, it wraps, which isn't quite the same concept, and again, it was working until recently. As for my config, here it is minus a few things that aren't relevant/sensitive |
Got it. The Fedora implementation is built on AppArmor (I think), so if Nix doesn't use that then it isn't relevant. If it was working until recently and the extension itself hasn't changed (which it shouldn't have, since I haven't made any releases in a while), then I'm inclined to go back to the original theory and say that this is something environmental or otherwise unique to a recent change in NixOS (it isn't affecting me on Ubuntu LTS). But we'll leave this open and see. |
Given the error looks like a library conflict with libswresample, probably you aren't seeing the error because Ubuntu is perpetually WAY out of date just to be annoying. I wish it were easier to get a more detailed error report from Firefox, but that's all it gives me in its console when I try to run the extension, and I'd have to go through the arduous task of getting a dev build setup to get anything in an actual terminal since -g doesn't seem to want to work when launching it, even though gdb works just fine on the system. Guess I could just launch it through gdb directly, give me a few. |
And now my head just hurts, running it in gdb, it functioned without issue. Edit: Okay, there's something extra fucky going on. If you run it from the .firefox-wrapped executable, rather than the firefox shortcut, it magically just works, but I don't even have the slightest clue how that even makes sense. Edit2: to clarify, most applications have a simple link, I.E. type firefox in the console to launch it, that links to the actual executable, which in this case is .firefox-wrapped. The link breaks it, the proper executable makes it function fine, and given it's a simple soft link, that doesn't even make sense. |
Thanks for your discovery! Based on this I found that the issue comes from the firefox wrapper adding ffmpeg libs to First of all, $ cat $(realpath $(which firefox)) | grep ffmpeg
LD_LIBRARY_PATH=${LD_LIBRARY_PATH/':''/nix/store/b1c4w2g6lrmwadx7gz2g0vaznbb6dha1-ffmpeg-5.1.3-lib/lib64'':'/':'}
LD_LIBRARY_PATH='/nix/store/b1c4w2g6lrmwadx7gz2g0vaznbb6dha1-ffmpeg-5.1.3-lib/lib64'$LD_LIBRARY_PATH
LD_LIBRARY_PATH=${LD_LIBRARY_PATH/':''/nix/store/b1c4w2g6lrmwadx7gz2g0vaznbb6dha1-ffmpeg-5.1.3-lib/lib'':'/':'}
LD_LIBRARY_PATH='/nix/store/b1c4w2g6lrmwadx7gz2g0vaznbb6dha1-ffmpeg-5.1.3-lib/lib'$LD_LIBRARY_PATH Then I bisected the libraries and located ffmpeg. That makes sense since As for the workaround, I haven't used this extension so I can't provide a detailed solution. I was trying to launch mpv through uri scheme from firefox when I encountered this problem. Update: Here is my workaround, which overwrites |
Wow, what a mess. Thank you for debugging this @tianze0926! |
Note: another option specifically for |
I'm folding #98 into this, see #98 (comment) for context. |
I've unpinned the ffmpeg used by mpv in NixOS/nixpkgs#265069. Now they should use the same ffmpeg ( BTW, there is no need to run programs.firefox = {
enable = true;
nativeMessagingHosts.packages = [ pkgs.ff2mpv ];
} |
Describe the bug
I'm given this error when trying to use the extension, but mpv and yt-dlp works in the terminal just fine.
Reproduction steps
Steps to reproduce the behavior:
Expected behavior
It to just launch in MPV as usual
Platform information
The text was updated successfully, but these errors were encountered: