So, let’s talk technicals here. These UHD encodes aren’t your typical AVC encode like we’ve done in the past. This is a 4K HEVC encode with HDR10. If you don’t know what that is, then this is probably not the encode for you. If you do know what that is or want to learn, read on.
Before I start this primer, understand that this is being written for the Gundam 00 movie encode and will likely be revised as other 4K encodes are done.
To start, this movie is quite clearly an upscale from the original source. It is NOT recomposited at 4K. Since the 00 series and movie were probably animated somewhere around 540p to 720p, the base resolution of the animation in question has zero benefit in being blown up to 4K. So then, why the hell bother with this? Simple: HDR. HDR, or high-dynamic range, is a feature on many 4K TVs from the last 2 years or so and offers a much wider color gamut, allowing for richer, more accurate color reproduction. There are two versions of HDR on the market, HDR10 and Dolby Vision. There’s a lot to go into about the differences between the two, but that won’t be necessary here. We’re using HDR10 because A: it is the free HDR standard we can use and B: it is the HDR standard Sunrise used on the UHD BD.
Now, here’s the problem with the HDR and how it pertains to playback. Below is a capture of a frame from the 4K encode without the HDR color mapped to the image and a frame from the BD of the movie.
The 4K looks super washed out, right? That’s because the HDR data tells the display how to apply the ranges for high and low RGB, white point, and luma values, which will, in turn, display the colors as intended, and more accurately than the more limited color space provided by BD and an SDR panel. These values are baked into the video stream, and we pull them from the UHD BD using various tools and insert the values into the encoder when compressing the video. This allows the resulting MP4 to tell the display that it has HDR metadata and how to apply it.
Now, if you don’t have an HDR display, you can use MadVR to attempt to map the HDR back to an SDR colorspace. This isn’t perfect, but it does the job fairly well. You may find that things that you’d expect to be white might otherwise be a more grey color, but this is accurate to how the actual UHD BD displays on an HDR screen. If you do use this method, there is a special set of subtitles for playback you’ll want to use. More on that later. If you have a 10-bit panel for your computer, this can be a sort of pseudo-HDR, since you have better color reproduction, but probably not Rec.2020 color. Here’s a sample of the MadVR mapping next to the BD.
Still doesn’t look exactly right, does it? That’s why HDR to SDR mapping is not quite perfect, and why you may not want to bother with any of these until you have an HDR10 compatible display. However, if you watch the actual 4K BD on an HDR display, you’ll find that often thing that would be rendered in white in SDR are graded to a more grey color in HDR. Things like the location signs are a good example.
As for the actual encode, it uses an HEVC encode, otherwise known as x265. Like AVC being used on BD, HEVC is the native codec on UHD BD. It also natively supports 10-bit and higher, so hardware decoders won’t break the same way that AVC hardware does with 10-bit encodes. I’ve done my best to fine tune the encode settings, and from my own tests, the perceptual quality is the same as the actual UHD BD. This is a 10-bit unfiltered encode at a CRF value of 15. Not much else to say here. I expect to retain the same settings for any future encodes.
Now, one major downside I’ve discovered is playback options are limited. Plex was my optimal choice because it supports HDR metadata, but unfortunately, in order to enable subs, the video has to be transcoded, with results in a 1080p downscale in SDR without color mapping. I toyed with the idea of a pair of hardsubbed encodes, one for the dub, one for subs, but this meant twice as many encodes and it wasn’t worth the hassle, especially since these encodes are SLOOOOOW. Instead, things are still set up as a standard dual-audio MKV and I just ran an HDMI cable to my TV and set MadVR to HDR passthrough mode for that display, while leaving my desktop LCD in HDR mapping mode. If you were a fan of the old tracksets feature (as I was), I had to drop them here because the LAV splitter doesn’t support them and LAV is needed for HEVC from my own testing.
Lastly, there is an alternate set of subs included. One set is tagged HDR and are the default ones, and the others are SDR. Because the HDR mapping is applied by the display and not applied to the video stream, regular white subs will get blown out, so the actual subs are a grey color, with any colors muted the same way as the video. However, if you use MadVR and adapt the colors to an SDR display, MadVR only color maps the video and not the softsubs, so the SDR subs are standard colors.
The TL;DR version is basically this: This encode is best used if you have a 4K display with HDR10. If you do, I hope you’ll enjoy this. If you don’t and you give it a shot anyway, let me know your results anyway. Feel free to ask any playback questions below and I’ll do my best to address them as well as I can.