Technical fixes
LUTs and DCTLs to fix YCbCr to RGB conversion problems
What is this?
When you import video files containing YCbCr streams (e.g. H.264 or H.265) into your editor, they will be converted to RGB for display.
There are 3 standards for video files defining this conversion: ITU-R BT.601, ITU-R BT.709, and ITU-R BT.2020.
The one that's used is usually dictated by a flag in the metadata of the stream, it's called matrix coefficients. However, in some cases this flag is incorrect/missing or the editor is not reading it at all.
If this happens and the stream is decoded with the wrong matrix, the colors will be off, and you won't be able to correct them with RGB color space conversions. (This is a common misconception usually caused by the fact, that these standards also define RGB primaries.)
This technical pack provides fixes for these situations. I also included fixes for data range issues.
For a better understanding of this issue, you can watch my video about Fujifilm files:
Notice: The LUTs used in the video are now part of this package, they are the "bt.709_to_bt.601" conversions.
If you record internal HLG with the Fuji, the "bt.709_to_bt.2020" conversion should be used.
UPDATE 09/2019: Davinci Resolve v16 fixed the interpretation issue in Davinci YRGB mode, no need to transcode. RCM is still buggy.
UPDATE 08/2022: Adobe Premiere 2022 (v22.2.0) is still problematic. (that is on Windows 10, couldn't check it on Mac)
What's in the package?
bt.709_to_bt.601.dctl | Use when your footage requires the BT.601 matrix but it's decoded with the BT.709 matrix. (Davinci CTL version) |
bt.709_to_bt.601_premiere.cube | Use when your footage requires the BT.601 matrix but it's decoded with the BT.709 matrix. (3D LUT, Premiere version) |
bt.709_to_bt.601_resolve.cube | Use when your footage requires the BT.601 matrix but it's decoded with the BT.709 matrix. (3D LUT, Resolve version) |
bt.601_to_bt.709.dctl | Use when your footage requires the BT.709 matrix but it's decoded with the BT.601 matrix. (Davinci CTL version) |
bt.601_to_bt.709_premiere.cube | Use when your footage requires the BT.709 matrix but it's decoded with the BT.601 matrix. (3D LUT, Premiere version) |
bt.601_to_bt.709_resolve.cube | Use when your footage requires the BT.709 matrix but it's decoded with the BT.601 matrix. (3D LUT, Resolve version) |
bt.709_to_bt.2020.dctl | Use when your footage requires the BT.2020 matrix but it's decoded with the BT.709 matrix. (Davinci CTL version) |
bt.709_to_bt.2020_premiere.cube | Use when your footage requires the BT.2020 matrix but it's decoded with the BT.709 matrix. (3D LUT, Premiere version) |
bt.709_to_bt.2020_resolve.cube | Use when your footage requires the BT.2020 matrix but it's decoded with the BT.709 matrix. (3D LUT, Resolve version) |
bt.2020_to_bt.709.dctl | Use when your footage requires the BT.709 matrix but it's decoded with the BT.2020 matrix. (Davinci CTL version) |
bt.2020_to_bt.709_premiere.cube | Use when your footage requires the BT.709 matrix but it's decoded with the BT.2020 matrix. (3D LUT, Premiere version) |
bt.2020_to_bt.709_resolve.cube | Use when your footage requires the BT.709 matrix but it's decoded with the BT.2020 matrix. (3D LUT, Resolve version) |
full_to_legal_premiere.cube | Full to legal scaling, sub-blacks, super-whites preserved (1D LUT, Premiere version) |
full_to_legal_resolve.cube | Full to legal scaling, sub-blacks, super-whites preserved (1D LUT, Resolve version) |
legal_to_full_premiere.cube | Legal to full scaling (1D LUT, Premiere version) |
legal_to_full_resolve.cube | Legal to full scaling (1D LUT, Resolve version) |
Purchase
Secure payment is processed by LemonSqueezy, a subsidiary of Stripe, Inc.
Colorizer Technical Fixes | €25 | (Net price, applicable taxes may apply) | BUY NOW |
Fixing with FFMPEG
You can also fix this issue by transcoding your footage. I'll use FFMPEG, a free command line software to demonstrate the fix on internal Fujifilm recordings.
We want our final video to have the BT.709 matrix, because that will be interpreted correctly in all mainstream editors. Just changing the flag won't work, because the underlying data has to be converted as well.
I'll use the zscale video filter to do the magic:
ffmpeg -i INPUT.MOV -vf zscale=rin=full:r=full:pin=709:p=709:tin=601:t=709:min=170m:m=709 -c:v prores_ks -profile:v 2 -c:a copy OUTPUT.MOV
Explanation:
rin=full:r=full
means that both the input and output use the full data range. It's better to not loose any precision.
Keep in mind that a full range ProRes file will be interpreted as video range in Resolve and in Premiere.
You can either use the "full_to_legal" LUT from my package, or in Resolve go to the Media pool, select your clips, right click, go to Clip attributes and select "Full" at Data levels.
In Premiere go to Effects, and choose Lumetri Presets -> Technical -> Full to Legal range, 10/12-bit.
pin=709:p=709
means that both the input and output use the color primaries defined by BT.709. This is how Fuji flags it's files, we won't change it.
tin=601:t=709
means that the input transfer characteristics are BT.601 and we will convert it to BT.709. It won't affect the image because BT.601 and BT.709 share the same transfer characteristics, but let's convert everything to BT.709.
min=170m:m=709
means that the input matrix coefficients are SMPTE170M (Fuji uses this tag and it equals to BT.601 in H.264/H.265) and the output matrix coefficients are BT.709. This is the most important part of our conversion.
-c:v prores_ks -profile:v 2
means that we'll convert to ProRes using profile no. 2. Possible values for the profile are:
0: ProRes422 (Proxy)
1: ProRes422 (LT)
2: ProRes422 (Normal)
3: ProRes422 (HQ)
For Windows users only:
If you want to batch convert multiple MOV files, just put them in a folder, copy ffmpeg.exe in the same folder, and make a batch file with the following command in the same folder:
for %%a in ("*.mov") do ffmpeg -i "%%a" -vf zscale=rin=full:r=full:pin=709:p=709:tin=601:t=709:min=170m:m=709 -c:v prores_ks -profile:v 2 -c:a copy "%%~na_ProRes.mov"
You can download FFMPEG from here: https://ffmpeg.org/download.html