Log in

View Full Version : Workflow for grainy HDR content


jriker1
3rd August 2023, 14:27
I have some decent workflows for 1080p content, 4k HDR10 content and Dolby Vision content (low grain). What I'm struggling with is 4k HDR10 and maybe Dolby Vision content that is super grainy.

For 1080p content I open the material in Premiere and run NeatVideo on it to reduce the grain and sharpen a bit. Then export DNxHR HQ. Then process it thru x265 in ffmpeg.

If it's just 4k clean and HDR10 or Dolby Vision I just encode with x265 in ffmpeg with the appropriate HDR10 and Dolby Vision data as part of the command.

Question first. Is it fair to say that HDR10 and Dolby Vision is strictly metadata either respectively on the header of the video or applied to each frame? So for example if using a non 4k or HDR/Dolby Vision supported monitor, the video would look the same with or without that data? So the video itself is what it is and the HDR10 and Dolby Vision information tells the TV how to display it properly?

Let me know on the above. That said, to date I have tried to leave HDR10/Dolby Vision content as much as I can as is as wasn't sure if any extra processing would damage the data provided from HDR10/Dolby Vision. Does anyone have any recommendations without ending up with a HEVC file as big or bigger than the source, how to deal with this?

Here is an example of what I'm doing normally:

ffmpeg -i <input>.mkv -sn -an -f yuv4mpegpipe -strict -1 -pix_fmt yuv420p10le - | x265-10b - --input-depth 10 --output-depth 10 --y4m --preset slow --hdr10 --hdr10-opt --high-tier --repeat-headers --crf 19 --master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(40000000,50)" --max-cll "1000,401" --chromaloc 2 --no-sao --range limited --keyint 24 --colormatrix bt2020nc --colorprim bt2020 --transfer smpte2084 --vbv-bufsize 160000 --vbv-maxrate 160000 <output>.hevc

Let's look at a disk of mine. Bad Boys from 1995. Guessing it's been remastered as has HDR10 metadata and thinking that wasn't a thing in 1995? i started encoding this with crf 17 as wanted to preserve the video as much as possible. Ran all night which is odd for my system and wasn't done and already over 40GB. Source currently is 77GB with the audio and sub tracks. Assuming I either need to set a higher CRF number or do some cleanup.

Any thoughts? I could open the video in Premiere and use NeatVideo on it to reduce the grain then process it as normal but long story longer, was concerned I can't do that with content that has HDR10 or Dolby Vision metadata but wasn't sure.

Boulder
3rd August 2023, 17:57
As far as I know, what the encoder "sees" won't be affected by the material having the HDR10 parameters or the DV RPU injected. I do denoising and resizing on HDR stuff all the time and I have not noticed any ill effects.

In case if excessive filesizes, one thing to consider is downscaling to 1440p (i.e. 2560 x ... for widescreen sources). The difference to a full 4K during playback most likely cannot be detected if you use something like Dogway's deep_resize function for downscaling.

jriker1
3rd August 2023, 19:51
As far as I know, what the encoder "sees" won't be affected by the material having the HDR10 parameters or the DV RPU injected. I do denoising and resizing on HDR stuff all the time and I have not noticed any ill effects.

In case if excessive filesizes, one thing to consider is downscaling to 1440p (i.e. 2560 x ... for widescreen sources). The difference to a full 4K during playback most likely cannot be detected if you use something like Dogway's deep_resize function for downscaling.

Thanks for the reply. Any suggestions of denoising or the "proper" way to manage a file in Premiere? Know it has various settings around colorspace like Rec 2100 PQ or 2100 HLG. Assuming stay away from 709. There are also color management settings for any given Premiere project listing HDR White 100, 203 or 300. Mine defaulting to 203. Not sure what matters to load up a file, just add Neat Video to it, tweak the noise, and export.

jriker1
5th August 2023, 00:14
So here's the weird part. Note this video is HDR10 no Dolby Vision. Here is a picture of the source moved to an MKV:

https://ibb.co/g6rgcKG

Here is an image when I did a Neat Video cleanup in Premiere and exported to MXF 10 bit

https://ibb.co/SswRdXx

I then convert basically with the same settings as above but CRF 17 and the appropriate HDR10 metadata. I get the below which I thought was weird for the reasons below the link to the picture.

https://ibb.co/YLQZgHc

Haven't tried this on an actual HDR monitor or TV but what's up with this?

What's odd with VLC is the last picture is SUPER red but when you save the image it's similar to the second picture.

Boulder
5th August 2023, 10:05
So here's the weird part. Note this video is HDR10 no Dolby Vision. Here is a picture of the source moved to an MKV:

https://ibb.co/g6rgcKG

Here is an image when I did a Neat Video cleanup in Premiere and exported to MXF 10 bit

https://ibb.co/SswRdXx

I then convert basically with the same settings as above but CRF 17 and the appropriate HDR10 metadata. I get the below which I thought was weird for the reasons below the link to the picture.

https://ibb.co/YLQZgHc

Haven't tried this on an actual HDR monitor or TV but what's up with this?

What's odd with VLC is the last picture is SUPER red but when you save the image it's similar to the second picture.
To me it looks like the output is tonemapped from HDR to SDR so there must be something in your settings. I myself use Avisynth+ to process things so the colorspace is kept as it is in the original (well, converted to linear RGB for the downscaling part, but converted back to the original afterwards).

jriker1
5th August 2023, 13:31
To me it looks like the output is tonemapped from HDR to SDR so there must be something in your settings. I myself use Avisynth+ to process things so the colorspace is kept as it is in the original (well, converted to linear RGB for the downscaling part, but converted back to the original afterwards).

Yeah not downscaling but none of the other noise reduction tools seem as effective or easy to control as NeatVideo. I own the premiere pro and VirutualDub versions of it but can't understand what's happening in Premiere. If I litterally open the video and convert it same deal. It does look like it's converting it maybe to Rec 709 but the settings seem to dictate otherwise. In this case it's HDR10 so essentially talking metadata I would think. I know in MediaInfo references PQ but not sure if I should be selecting 2100 HLG. Don't think so plus Premiere sets the sequence to 2100 PQ as that's what it detects.

Boulder
5th August 2023, 14:48
Yeah not downscaling but none of the other noise reduction tools seem as effective or easy to control as NeatVideo. I own the premiere pro and VirutualDub versions of it but can't understand what's happening in Premiere. If I litterally open the video and convert it same deal. It does look like it's converting it maybe to Rec 709 but the settings seem to dictate otherwise. In this case it's HDR10 so essentially talking metadata I would think. I know in MediaInfo references PQ but not sure if I should be selecting 2100 HLG. Don't think so plus Premiere sets the sequence to 2100 PQ as that's what it detects.

https://helpx.adobe.com/premiere-pro/using/hdr-workflows.html has the settings for HDR, I'd doublecheck that yours are that way (use PQ in place of HLG).

Did you compare the Mediainfo output of both source and result?

chainring
15th August 2023, 01:42
In case if excessive filesizes, one thing to consider is downscaling to 1440p (i.e. 2560 x ... for widescreen sources). The difference to a full 4K during playback most likely cannot be detected if you use something like Dogway's deep_resize function for downscaling.

That's what I've been doing for a number of years now. The speedup during encoding and space savings are nothing to scoff at. I took the source from some UHD movies I know, encoded at the full 4K, then 2560 and 1080. Watched them all via an Nvidia Shield on a LG B8 OLED and I was quite surprised I couldn't see a difference between 4K and 2560. 1080 was definitely noticeable, though nothing objectionable at all.

benwaggoner
16th August 2023, 18:20
That's what I've been doing for a number of years now. The speedup during encoding and space savings are nothing to scoff at. I took the source from some UHD movies I know, encoded at the full 4K, then 2560 and 1080. Watched them all via an Nvidia Shield on a LG B8 OLED and I was quite surprised I couldn't see a difference between 4K and 2560. 1080 was definitely noticeable, though nothing objectionable at all.
And for a lot of shot-on-film content, there's not actually any signal above 1440p (or even 1080p in some cases); the extra detail is really just noise (grain).

Most people actually prefer not to get a lot of detailed 4K grain, visually, so the 1440p can look perceptibly better. And except for end-to-end 4K digital movies in the last decade, the low pass filter will actually bring the visual experience closer to what the original creatives would have seen using 14 foot Lambert projection onto a perf screen. So much of the grain we see in 4K is actually contrary to creative intent.