Align version of MPV built against with lib version available
So this started out as my trying to support MPV 0.35 (which now should be MPV 0.35.1) but ended up being the discovery that Stremio is built against one version of MPV, and then depends on libmpv that's available in the OS, which could be of a different version, and this introduces issues in compatibility.
Support MPV 0.35
So I'm trying to bump the official flatpak to newer versions of ffmpeg and mpv to help address some outstanding bugs: https://github.com/flathub/com.stremio.Stremio/pull/8
As can be seen in the MPV 0.35 release notes
- pipewire support has been added
However when compiling with both pipewire and pulse support it prefers pipewire by default which breaks pulse systems.
For compatibility reasons I suggest that we add ao=pulse by default since pipewire implements a pulse interface.
then when we add mpv.conf support this can be changed by users as needed.
Hold on this for a bit, going to see If I can reproduce this on MPV directly and get it fixed upstream
@rijnhard the developer from our team (@core1024) that can review your changes will be back after 3 Jan
Ok i think this is a little more of an issue that I originally thought. There is a clear disconnect between the published flatpak and this code base.
The flatpak config file here is quite out of date firstly (compared to https://github.com/flathub/io.mpv.Mpv)
- mpv versions don't match
- ffmpeg versions don't match.
It would be worth it to align these.
as this is making the debugging a bit difficult
To add some complications, it looks like Stremio ships with mpv in order to build for windows etc. And when building it appears to build those versions instead of the version provided by the flatpak.
This line in the compile gives it away:
-- Found MPV: /run/build/stremio/deps/libmpv/include
I think this was always broken in the flatpak.
Unless you intentionally want to force a specific version for all os's?
Another note: the qthelper.hpp has been removed and deprecated.
That can be moved out of deps into the main code base
and mpv_opengl_init_params now takes one less argument so this needs to be updated: https://github.com/Stremio/stremio-shell/blob/master/mpv.cpp#L68
Unfortunately doing all these changes breaks the UI. at least when building the flatpak locally. So this is the point where my cowboying skills run out.
maybe one more thing to note.
with the funky Stremio compiled with the provided mpv 0.33, and using the mpv 0.35 library provided by flatpak it now runs. but I have to explicitly disable pipewire in the MPV build arguments --disable-pipewire
Secondly: also seeing this warning:
Driver 'opengl-cb' has been replaced with 'libmpv'!
Maybe as more of a side note. it would probably be easier to manage flatpak / native debs / osx builds with meson. since then all 3 can use the same config. Which leaves less room for issues by centralising config to a large degree.
it also supports some of the cmake functionality you already use. https://mesonbuild.com/Dependencies.html
This would allow the use of ninja for packaging which could simplify things, because checkinstall is very NOT recommended.
I think to summarise the issue here is inconsistent MPV versions. The version stremio builds against, vs the versions available at the point of installation (libmpv) are different.
So you either have to:
- build stremio against multiple versions of
libmpv(based on whats available on that os) - ship stremio with its own version of
libmpvand align that across all oses.
Currently it feels the worst of both
@jaruba did anyone take a look at this? I'm willing to give it another bash but I need to know which direction the project wants to take...
@jaruba did anyone take a look at this? I'm willing to give it another bash but I need to know which direction the project wants to take...
Do you want to build a fork of Stremio with these specific changes? I am willing to add Apple Silicon native build support. The Stremio team can then take a look at those changes and merge them if they like it.