- Time
- (Edited)
- Post link
Guide for Working with 4K HDR Blu-ray Rips in SDR
HDR footage is nothing new. We’ve been using it for well over a decade in SDR workflows, despite HDR delivery being relatively new. Think of Arri Log C, RED RWG/Log3G10, Sony S-log, or Panasonic V-log. These are all HDR color spaces that we’ve been grading inside of SDR environments for a very long time. So treating the HDR footage from a UHD disc is a very similar process. Here’s how to get your UHD Blu-ray discs to a point where you can properly add custom grades to them.
•Create a remux from your UHD disc, using MakeMKV. This will copy the entire HDR film into an MKV wrapper without transcoding. (There are lots of guides for this online already, so I won’t go through that here).
In my example, I’m using a 4K HDR remux of X-Men: Apocalypse (Sorry, I haven’t bought my Star Wars OT in 4K yet).
•If you have DaVinci Resolve Studio (the paid version of Resolve), keep reading. But if you only have the free version of DaVinci Resolve (the non-studio version), skip down to the “UPDATE 06/03/2020” section below.
•Use Hybrid (FFmpeg GUI) to rewrap the MKV file to MP4 (Not transcode. We want to preserve the original HEVC file). The reason we need our 4K HDR HEVC file to exist within an MP4 wrapper is so DaVinci Resolve can import it. To do this, set your Video setting in Hybrid to “passthrough” and ensure the container is set to “mp4.” Audio can be set to “ignore,” since we don’t need audio for this. Once you’re done, set your output folder and file name, and add it to the queue.
•In Hybrid, go to the “Jobs” tab, and hit the “Start” button to start processing your queue.
Once it’s done, you will have your original HEVC file, now as an MP4.
•Import the MP4 HEVC file into DaVinci Resolve Studio’s media pool, on the Media page. (Note: the free version of Resolve does not support importing HDR HEVC files, so this must be done in Resolve Studio. If you only have access to the free version, don’t worry! Skip down to the the “UPDATE 06/03/2020” section below)
•Ensure that the Resolve color management settings are set to the default: DaVinci YRGB, with timeline color space set to Rec. 709 Gamma 2.4.
•Make sure your project resolution and framerate are set to 4K UHD (3840x2160), 23.976fps.
•On the Edit page, pull the new MP4 file into a new timeline. It will look flat and ugly, with a slight green shift. This is what we want. We don’t want a tonemapped version. We want this log, flat, ugly version. This means it’s the HDR source. (Also, please note that the file will be a bit sluggish in Resolve because HEVC is a high-compression delivery codec and not really intended for editing/grading).
•On the delivery page, prepare a ProRes 422 HQ export of the film, in full resolution 3840x2160. (You may use ProRes 4444 if preferred, although it will use more storage space. ProRes 422 HQ is still 10bit, so it should suffice and save you a bit of storage). Once you’ve prepared the ProRes export, set an output location and add it to the render queue. Then on the render queue, hit “Start Render.”
This will give you the full 10-bit, wide gamut footage, without any of the HDR metadata. And since it’s ProRes (an intermediate codec intended for editing and grading), it will run much faster and be much less taxing on your CPU/GPU than the original HEVC version. The file size will be relatively large — approximately 220 GB / hour. You may think this is excessive, but that’s the price you have to pay to use proper intermediate codecs! (Using proper codecs will save you much time and frustration).
Note: If you’re on a Windows PC then you unfortunately won’t have the ProRes encoding options. You may use DNxHR HQX instead. It’s a fine alternative to ProRes HQ, although it is a bit more sluggish. Or you may also use any of your preferred image sequence formats: EXR, DPX, TIFF, etc. (although, in my opinion, those produce unnecessarily large file sizes, especially for footage sourced from HEVC).
UPDATE 06/03/2020 - If you only have the free version of DaVinci Resolve and not the paid Studio version, then you can convert to ProRes straight inside of FFmpeg (or the Hybrid FFmpeg GUI). Afterwards, you may follow the rest of this guide using the free version of Resolve. Below are some settings you can use in Hybrid. Or forum user oohteedee has kindly provided the command line for this in the comments below, if you prefer command line).
Once your ProRes export is complete, you now have your film ready to be graded and used in your fan restoration! This new ProRes clip is what you will now import into Resolve (or any other software) and use from now on.
The next step is knowing how to use this HDR footage and make it look pretty. Here’s one simple way to get a starting point in your color grade, using a Color Space Transform (CST) node in Resolve:
•Open your OpenFX palette and drag the “Color Space Transform” effect onto a new node.
•Set the Input Color Space to Rec.2020 and the Input Gamma to ST2084.
•Set the Output Color Space to Rec.709 and the Output Gamma to Gamma 2.4.
•Change Tone Mapping Method to Luminance Mapping, and Gamut Mapping to Saturation Mapping.
Now we have properly converted the color space from Rec.2020 to Rec.709, with tone mapping. This won’t look perfect, because every film is graded differently. It’s simply a color space conversion. But you’re now in the correct color space for SDR, and it should provide you with a really great starting point. You may add a node before or after the CST node, and tweak it to taste, using Lift/Gamma/Gain, YRGB Curves, and Contrast/Pivot/Hue/Saturation.
In my case, I added a node before the CST, and brought down the gamma/midtones as well as brought the temperature slightly cooler, and now it feels a bit more balanced.
If Resolve isn’t your preferred grading application, you may export your custom CST/grade as a Lookup Table (LUT) and bring it into any other software to use as a starting point for your grading. Here’s how:
•Right-click on a clip that has your CST/grade applied to it.
•Click “Generate 3D LUT (33 Point Cube).”
•Choose a directory where you want to export the LUT.
You can now use the .cube LUT file in any supported application.
You don’t need to grade the HDR footage with a CST like this; it’s just one way to get a quick starting point. You can do 100% custom grading on your HDR footage instead, if preferred. But I think this is a quick and effective way to get in the right ballpark.
I went ahead and created a LUT out of this, in case anyone wants it for their non-Resolve software applications. Just note that, in terms of grading hierarchy, you’ll want to make any large color adjustments in a layer/node before the LUT. There are two flavors of the LUT – one with just the default CST, and one with the CST + a few custom adjustments. Feel free to download them here.
And that’s it. Hope this helps.
-44