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

vo=gpu-next support #362

Open
Erromango opened this issue Feb 1, 2023 · 6 comments
Open

vo=gpu-next support #362

Erromango opened this issue Feb 1, 2023 · 6 comments

Comments

@Erromango
Copy link

Since latest mpv supports Dolby vision using vo=gpu-next, will Jmp support that?

I’ve tried it with jellyfin shim and it can render dovi video correctly
But put the same mpv.conf in config folder of jmp it didn’t work.replacing mpv.DLL with latest one also didn’t help.(which works for Plexhtpc on windows)
Jmp log shows on startup vo is set to gpu-next but then be changed to vo=libmpv

@nyanmisaka
Copy link
Member

I think the next release of JMP should be built with FFmpeg 5.0+ and the latest libplacebo to enable DOVI tone-mapping support. MPV/libmpv have changed their API so you can't just replace the DLL.

@iwalton3
Copy link
Member

Let me know if updating MPV to version 20230205 e439ddc in the next release fixes this.

@nyanmisaka
Copy link
Member

nyanmisaka commented Feb 13, 2023

It doesn't help at least for me. JMP will always overwrite the vo option to libmpv instead of the configured gpu-next, which is the libplacebo renderer used for DV tone-mapping.

2023-02-13 19:29:13 [ DEBUG ] PlayerComponent.cpp @ 588 - cplayer: Setting option 'vo' = 'gpu-next' (flags = 4) 
......
......
2023-02-13 19:29:13 [ DEBUG ] PlayerComponent.cpp @ 588 - cplayer: Set property: vo="libmpv" -> 1 

void PlayerComponent::setWindow(QQuickWindow* window)
{
QString vo = "libmpv";
#ifdef TARGET_RPI
window->setFlags(Qt::FramelessWindowHint);
vo = "rpi";
#endif
m_window = window;
if (!window)
return;
QString forceVo = SettingsComponent::Get().value(SETTINGS_SECTION_VIDEO, "debug.force_vo").toString();
if (forceVo.size())
vo = forceVo;
mpv::qt::set_property(m_mpv, "vo", vo);
if (vo == "libmpv")
setQtQuickWindow(window);
}

BTW on Linux (debian/ubuntu) JMP is linked against the libmpv/libplacebo/FFmpeg libs from distro. I doubt on some old distros these libs are too old to enable vo=gpu-next support, such as on Ubuntu 22.04 (jammy) the FFmpeg version is 4.4.2, which doesn't support DV metadata.

@nyanmisaka
Copy link
Member

nyanmisaka commented Feb 13, 2023

Well, it seems libmpv doesn't support libplacebo (gpu-next) in its API yet.
mpv-player/mpv#10810
mpv-player/mpv#6575
mpv-player/mpv#11031

So the jellyfin-mpv-shim is a better choice if you need client side DV tone-mapping for the time being.

@iwalton3
Copy link
Member

Yes JMP is using the rendering api. Details are here: https://github.com/jellyfin/jellyfin-media-player/blob/193cacf817dd1c0ac289cb49f61a81c77c2c9fbb/src/player/PlayerQuickItem.cpp

Unfortunately right now the only way to avoid this and allow all of the MPV output options is to use MPV Shim, since all of the UI for it is drawn inside of a window rendered by MPV.

It may be possible to use window embedding which could avoid some of this overhead and support gpu-next now, but it requires different code per platform and may have other issues. https://mpv.io/manual/master/#options-wid

@RononDex
Copy link

Has there been any update on gpu-next support? Noticed that tone-mapping in JellyfinMediaPlayer is off

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

4 participants