Topic: 4K HDR (10-bit) appears washed out after transcoding

Hi there!
I'm currently trying to transcode some 4K HDR video files to play them at 60 FPS. However after converting with the default settings (NVENC - H.265) on the transcode page (SVPCode) I'm finding that the files look incredibly washed out and colourless.

When playing back the video files using MPC-HC with SVP enabled however the colours look normal when SVP is transcoding directly (however due to the quality of the files this causes notable stutter on playback - even if GPU hardware acceleration is enabled).

Any help would be much appreciated!

Re: 4K HDR (10-bit) appears washed out after transcoding

SVP does transcoding via mpv player which is unable to preserve HDR meta-data after encoding. It can only do tone mapping (i.e. "conversion") from HDR to SDR.

Re: 4K HDR (10-bit) appears washed out after transcoding

Thanks for replying! Do you know which settings would work best to get good tonemapping results when converting to SDR?

Re: 4K HDR (10-bit) appears washed out after transcoding

In fact, mpv does tone mapping via compute shaders on GPU. And all that GPU processing is not active in encoding mode.
Not sure now what we could do about this hmm

Re: 4K HDR (10-bit) appears washed out after transcoding

You can play with ffmpeg's tonemap filter

Switch to 'advanced' mode, put something like "zscale=transfer=linear,tonemap=reinhard,zscale=transfer=bt709,format=yuv420p" into lavfi field, set depth = 8 bit
This will do 10-bit HDR to 8-bit SDR conversion using reinhard tone mapping.

We'll think how to automate this in a future SVPcode build...

Re: 4K HDR (10-bit) appears washed out after transcoding

What if you add in the HDR metadata afterwards?  I.E using ffmpeg:

ffmpeg -i INPUT_FILE.mkv -c copy -map 0 -color_trc smpte2084 -color_primaries bt2020 -colorspace bt2020nc OUTPUT_FILE.mkv

Where INPUT_FILE.mkv is the transcoded video that's washed out and OUTPUT_FILE.mkv is whatever output filename you'd like with no spaces

Re: 4K HDR (10-bit) appears washed out after transcoding

Not sure you're coping anything other than a color space by this command.

There're static metadata - https://x265.readthedocs.io/en/default/ … er-display
and dynamic data - the same (?) values defined per-frame - https://x265.readthedocs.io/en/default/ … hdr10-info

Re: 4K HDR (10-bit) appears washed out after transcoding

Chainik wrote:

SVP does transcoding via mpv player which is unable to preserve HDR meta-data after encoding...

Will this be ever possible? Maybe with in the last HDR-able update of avisynth, if not from mpv engine?