You are not logged in.

#1 2020-04-03 09:45:05

rezad
Member
Registered: 2014-09-17
Posts: 177

vlc video output differ with mpv for hdr files.

I have a non-hdr laptop and a hdr tv that I use for movies.
I recently noticed that hdr videos are not correctly shown on vlc and mpv (my two video players)
I dont mean that dont play.
let me explain a bit.
I first noticed that mpv showed a movie that supposed to be hdr and 4k with a opaque quality to it.
I chucked it up to bad encoding on the movie.
but I saw more and accidentally noticed that after removing hwdec option (hardware decoding) in mpv.conf it shows those movies with better colors.

now I have noticed that mpv and vlc show the same hdr movies differently (but not sdr movies, or maybe those too but way less obvious that I dont see it).

these screenshots of a movie (arrival 2016) which show that vlc shows the collor of the hair of the actress as not red but mpv shows more red.
https://imgur.com/a/tgN6TeN

I have tested with my tv and I think mpv is more similar to it than vlc.

any idea what to change in vlc or if maybe mpv and my tv are wrong or something in between?

p.s.
vlc on my tablet also shows the same colors as vlc on laptop.
also mxplayer on tablet(android) also plays it same as vlc.

so mpv is wrong?

Last edited by rezad (2020-04-03 11:15:05)

Offline

#2 2023-03-13 21:00:42

Soyman
Member
Registered: 2017-06-23
Posts: 24

Re: vlc video output differ with mpv for hdr files.

This is a question of tonemapping.
VLC and mpv are using different tonemappers to map the HDR content to SDR.
HDR display support is not good on linux so both players are most likely tonemapping the HDR signal down to a SDR signal.
There is no correct way to do this mapping. The many ways to do it all have tradeoffs.

It is informative to search for "HDR" in mpv's manpage, there is a lot of configuration possibilities.

It seems to me like VLC is using a tonemapper that linearly scales the HDR range down to SDR. Doing that no information is lost but the image becomes very desaturated and low contrast.
MPV is using one of many tonemappers that attempts to imitate what the signal should look like. The downside of that is that some information will be lost as it cannot fit into the SDR dynamic range.
There is usually some non-linear compression of highlights in this sort of tonemapper. There can be many other transformations of the colorspace as well. The mpv manpage speaks on this at length.

You can customize the tonemapper in MPV quite a bit it seems but I don't know about VLC.

Offline

#3 2023-03-14 18:37:26

rezad
Member
Registered: 2014-09-17
Posts: 177

Re: vlc video output differ with mpv for hdr files.

thanks for the answer after such a long time.

Offline

Board footer

Powered by FluxBB