Log in

View Full Version : Wow, HDR to SDR is more trouble than its worth


Neillithan
23rd January 2018, 10:56
I was attempting to convert a 10-bit HDR sample to an 8-bit SDR sample.. and after a bunch of bad luck with extremely washed out, gray videos, I decided to try and convert the HDR sample to an HDR sample, and then just use MadVR to display it properly.

This is what I eventually settled on:

StaxRip Settings:

Preset: Medium
Tune: Grain
Profile: Main 10
Level: Unrestricted
Mode: Two Pass
Depth: 10-bit
Bitrate: 16,000
Resolution: 1080p (downconverted from 4k)
VBV Bufsize: 50,000
VBV Maxrate: 40,000
Colorprim: BT 2020
Colormatrix: BT 2020 NC
Transfer: SMPTE 2084
Range: Limited

And then for MadVR, I chose:

Convert HDR content to SDR using pixel shader math
Display Peak Nits: 120
Check: Preserve Hue in HQ
Fix too bright & saturated pixels by 50% lum reduction and 50% saturation
Check: Compress Highlights
Check: Measure each frame's peak lum
Check: Restore details in compressed highlights
Check: Activate anti bloating filter: Strength 100%
Check: Activate Anti Ringing Filter

Pretty fantastic results, without the horrendous strain that 4K puts on my system.

Is there anything I could be doing differently? :)

Edit: Had to increase bitrate from 12,000 to 16,000 because 10bit was starving the video of necessary bits for certain scenes. The increased bitrate cleared up some of the artifacts.

Sparktank
23rd January 2018, 13:41
Well...

You could use FFMPEG to tone-map.
If you're getting "washed out" colors, etc, it means you aren't tone-mapping HDR to SDR properly.

Which AVS+ isn't ready for.
Vapoursynth can, but only one or two scripts exist. Both, of which, have not received a lot of feedback whether or not they are that successful or require more tweaking.

So, keeping HDR metadata is the best solution.
Which is exactly what you did.

x264 doesn't have any tone-mapping. It's not FFMPEG.

10bit video shouldnt nearly starve bitrate as much 8bit.
that could be the settings you're using.
MediaInfo doesn't mean squat, tbh.

If you use faster settings for encoding, you'll need more bitrate to keep it from looking like garbage.
If you use slower settings, or even placebo settings, you don't have to worry about bitrate nearly as much as garbage settings.

With FFMPEG, you have a few choices for tone-mapping HDR to SDR.
With Vapoursynth, there's only one script.
With AVS+, you have nothing, And if you manage to change things in AVS+, you're most likely doing it wrong.

Selur
25th February 2018, 10:01
With Vapoursynth, there's only one script.
There is more.
There is also a port or FFmpegs tone-map filter for Vapoursynth (https://github.com/ifb/vapoursynth-tonemap) which works fine.

Cu Selur