-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHDR_to_SDR_instructions.txt
38 lines (30 loc) · 1.92 KB
/
HDR_to_SDR_instructions.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Here you'll find instructions on how to convert High Dynamic Range (HDR) files
to Standard Dynamic Range (SDR) ones. The below assumes you already have FFmpeg
compiled with support for the "z library" (zimg) as it needs the zscale filter
(--enable-libzimg in FFmpeg's configure script).
https://github.com/sekrit-twc/zimg
Most UltraHD Blu-Ray releases come in 10-bits (YUV420P10 pixel format),
BT.2020 color space and HDR tone mapping. To convert them to SDR with ffx264,
follow the below instructions.
- Answer 'y' to "Pixel Format Conversion" and select YUV420P (for 8-bit
encoding) or YUV420P10 (for 10-bit). If you're using the latest git master
of x264 and did not force the configure option --bit-depth during configure
time of x264, simply choosing YUV420P10 will make your encode 10-bit as
libx264 will automatically switch to 10-bit mode. If you choose YUV420P instead,
the encode will be in 8-bit.
- Answer 'y' to "HDR to SDR Conversion" and choose the tone mapping algorithm.
I prefer Mobius but you are free to experiment with the other options. Next,
choose the color space option you want. The options presented are pretty
straight-forward.
- (Optional): if colors look too bleak (desaturated) here and there, you can
apply a "color saturation correction" and increase the saturation strength
until you are satisfied.
This is a sub-option part of the "HDR to SDR Conversion" option.
- (Optional): Scale down the input to appropriate resolution if you are targeting
HD/Full HD/NTSC/PAL output.
That's all there really is to it. The zscale and tonemap filters will do all the
work for you. I cannot guarantee 100% success rate, but I've done a handful of
HDR to SDR conversions myself of UHD Blu-rays targeting Full HD output and all
of the encodes were able to be decoded by my (a bit ageing) devices without a
single issue and everything looks OK to my eyes.
If you have further questions, don't hesitate to contact me. :)