Hi there,
I've been renting out an auditorium in a local cinema to see some classics on the big screen, and in the process have been encountering the same issue with colour for every film. All of the films I'm using are rips from UHD Blu-Rays (Non HDR) in an mkv container, using BT2020 colour space. When utilising the Rec. 2020 conversion in DCP-O-Matic, it's resulting in the colour still being a lot flatter than the original image. I've experimented with various colour settings but just can't seem to figure it out.. the default rec. 2020 conversion still being the best I can get, as seen in the examples below.
The DCP is being presented on a Christie CP4330 projector, which is capable of contrast ratios seen in the original image here, and I've personally seen films presented with this level of contrast, it's just DCP-O-Matic isn't converting correctly. If anybody could help me out with customising colour settings in DOM, or point me in the right direction with resources to figure this issue out, I'd greatly appreciate it.
DCP Conversion of UHD Blu-Ray files resulting in Colour being off
-
- Posts: 2
- Joined: Fri May 19, 2023 1:18 am
-
- Posts: 2804
- Joined: Tue Apr 15, 2014 9:11 pm
- Location: Germany
-
- Posts: 46
- Joined: Fri Apr 15, 2016 4:03 pm
Re: DCP Conversion of UHD Blu-Ray files resulting in Colour being off
Hi,
As I understand, the main problem here is that DCP-o-matic is using Rec. 2020 primaries with a 2.4 input gamma whereas it should apply a PQ (ST 2084) transfer function instead. If Carl adds it to the transfer functions list, I guess it would help a lot? Then there is still the tone mapping question...
DaVinci Resolve seems to deal well with UHD HDR sources when selecting a "Rec.2100 ST2084" Input Color Space (same primaries as Rec.2020). One could use it to output Rec.2020 gamma 2.4 intermediate for DCP-o-matic or directly DCI J2Ks.
Kewl's ffmpeg command in the other thread can also be adapted to output Rec.2020 gamma 2.4 (something like zscale=p=2020:t=709:m=2020_ncl and pix_fmt yuv444p12le for 12-bit with libx265).
Regarding your screenshots, I'm able to make the top frames (DoM) look like the bottom frames ("original"? VLC?) in Resolve using a CST node with these settings :
(Input color space is Rec.709 because DoM's preview converted 2020 to 709)
The question is whether DCP-o-matic could include a similar tone mapping algorithm. The only thing I changed from the default settings is the "Adaptation" slider I put to 99.00. By default it's 9.00 (brighter).
Similarly, when I played with the "Exodus" HDR HEVC sample there, I noticed than the VLC output was the same as the Resolve output with a Rec.2100/ST2084 input CST and the Tone Mapping/Adaptation slider set to 99.00. But is VLC right here?
I hope all this is making sense. At least we have workflows to make a DCP with consistent contrasts from a HDR Blu-ray by making an intermediate export in Resolve (or ffmpeg).
As I understand, the main problem here is that DCP-o-matic is using Rec. 2020 primaries with a 2.4 input gamma whereas it should apply a PQ (ST 2084) transfer function instead. If Carl adds it to the transfer functions list, I guess it would help a lot? Then there is still the tone mapping question...
DaVinci Resolve seems to deal well with UHD HDR sources when selecting a "Rec.2100 ST2084" Input Color Space (same primaries as Rec.2020). One could use it to output Rec.2020 gamma 2.4 intermediate for DCP-o-matic or directly DCI J2Ks.
Kewl's ffmpeg command in the other thread can also be adapted to output Rec.2020 gamma 2.4 (something like zscale=p=2020:t=709:m=2020_ncl and pix_fmt yuv444p12le for 12-bit with libx265).
Regarding your screenshots, I'm able to make the top frames (DoM) look like the bottom frames ("original"? VLC?) in Resolve using a CST node with these settings :
(Input color space is Rec.709 because DoM's preview converted 2020 to 709)
The question is whether DCP-o-matic could include a similar tone mapping algorithm. The only thing I changed from the default settings is the "Adaptation" slider I put to 99.00. By default it's 9.00 (brighter).
Similarly, when I played with the "Exodus" HDR HEVC sample there, I noticed than the VLC output was the same as the Resolve output with a Rec.2100/ST2084 input CST and the Tone Mapping/Adaptation slider set to 99.00. But is VLC right here?
I hope all this is making sense. At least we have workflows to make a DCP with consistent contrasts from a HDR Blu-ray by making an intermediate export in Resolve (or ffmpeg).
-
- Posts: 2
- Joined: Fri May 19, 2023 1:18 am
Re: DCP Conversion of UHD Blu-Ray files resulting in Colour being off
This was actually very helpful. The default settings for the CST in Resolve with Adaptation set to 9.0 as default actually worked pretty perfectly (at least in the case of this film - I may have to mess with some settings for other files), now I'm just figuring out converting DTS audio to AC3 so that Resolve can read it. As it stands, I have the colour issue fixed, just no audio for the file, so once I can get that conversion, I should be good to load everything back into DOM and convert. I've tested the REC .709 converted file from Resolve in DOM and everything looks as it should.
-
- Posts: 114
- Joined: Mon Jan 17, 2022 5:13 pm
- Location: Montreal, Canada
Re: DCP Conversion of UHD Blu-Ray files resulting in Colour being off
If you can avoid going from DTS to AC3, it would be better. Convert to PCM. FFmpeg should be able to do this.jpollard744 wrote: ↑Fri May 19, 2023 10:57 pm I'm just figuring out converting DTS audio to AC3 so that Resolve can read it. As it stands, I have the colour issue fixed, just no audio for the file, so once I can get that conversion, I should be good to load everything back into DOM and convert.
-
- Posts: 46
- Joined: Fri Apr 15, 2016 4:03 pm
Re: DCP Conversion of UHD Blu-Ray files resulting in Colour being off
Oh, nice. It would be interesting to check if the result is similar using ffmpeg.jpollard744 wrote: ↑Fri May 19, 2023 10:57 pm This was actually very helpful. The default settings for the CST in Resolve with Adaptation set to 9.0 as default actually worked pretty perfectly (at least in the case of this film - I may have to mess with some settings for other files)
Note that if the CST node outputs to Rec.709 Gamma 2.4, you should be using "Rec. 1886" in DoM. "Rec. 709" is "Rec.709 gamma 2.2" while "Rec. 1886" is "Rec.709 gamma 2.4". The difference is small though.
Code: Select all
ffmpeg -i file.mkv -vn -c:a pcm_s24le audio.wav
Code: Select all
ffmpeg -i file.mkv -c:v copy -c:a pcm_s24le newfile.mov
-
- Posts: 1
- Joined: Thu Sep 12, 2024 6:01 am
Re: DCP Conversion of UHD Blu-Ray files resulting in Colour being off
Hello, for some showings in a cinema i would like to convert several UHD blu rays to DCP using DCP-o-matic. However, i stumble into the same problem that the colors are off.
I have read the threads here and started using the way mentions (ffmpeg, hevc_videotoolbox), but i keep getting errors. So i assume i just do not do it completely right and thus do not understand the threads completely.
Is there anyone here who can invest a little bit of time to make 1) a short clear manual for this with 2) links to the tools needed? because at this moment i am kind of stuck.
@carsten is there any way this might be implemented into dcp-o-matic in the future? so this work around i not needed?
I have read the threads here and started using the way mentions (ffmpeg, hevc_videotoolbox), but i keep getting errors. So i assume i just do not do it completely right and thus do not understand the threads completely.
Is there anyone here who can invest a little bit of time to make 1) a short clear manual for this with 2) links to the tools needed? because at this moment i am kind of stuck.
@carsten is there any way this might be implemented into dcp-o-matic in the future? so this work around i not needed?
Last edited by raven84 on Thu Sep 12, 2024 6:09 am, edited 1 time in total.
-
- Posts: 114
- Joined: Mon Jan 17, 2022 5:13 pm
- Location: Montreal, Canada
Re: DCP Conversion of UHD Blu-Ray files resulting in Colour being off
This is what I'm doing with FFmpeg these days:
ffmpeg -i INFILE -map 0:0 -map 0:1 -vf zscale=t=linear,tonemap=hable:desat=15,zscale=p=2020:t=2020_10:m=2020_ncl -c:v hevc_videotoolbox -b:v 70000k -profile:v main10 -c:a copy OUTFILE
I use "videotoolbox" to speed up the encoding because I'm on macOS. The resulting file I bring into DOM. The "Colour" in DOM is Rec.2020.
What I found in my experiments in bringing UHD files into DOM is that problem is not the Rec.2020 color space per se (WCG Wide Color Gamut), but it's the HDR. So the "desat=15" part is to reduce that HDR to a more SDR.
First frame of the Exodus test file:
ffmpeg -i INFILE -map 0:0 -map 0:1 -vf zscale=t=linear,tonemap=hable:desat=15,zscale=p=2020:t=2020_10:m=2020_ncl -c:v hevc_videotoolbox -b:v 70000k -profile:v main10 -c:a copy OUTFILE
I use "videotoolbox" to speed up the encoding because I'm on macOS. The resulting file I bring into DOM. The "Colour" in DOM is Rec.2020.
What I found in my experiments in bringing UHD files into DOM is that problem is not the Rec.2020 color space per se (WCG Wide Color Gamut), but it's the HDR. So the "desat=15" part is to reduce that HDR to a more SDR.
First frame of the Exodus test file:
You do not have the required permissions to view the files attached to this post.
-
- Posts: 114
- Joined: Mon Jan 17, 2022 5:13 pm
- Location: Montreal, Canada
Re: DCP Conversion of UHD Blu-Ray files resulting in Colour being off
By the way, I also use FFplay to check the results of the FFmpeg processing, to see if it clips or not.
ffplay INFILE -vf waveform=filter=lowpass:scale=ire:graticule=green:flags=numbers+dots:fm=1
ffplay INFILE -vf waveform=filter=lowpass:scale=ire:graticule=green:flags=numbers+dots:fm=1
You do not have the required permissions to view the files attached to this post.
-
- Posts: 2804
- Joined: Tue Apr 15, 2014 9:11 pm
- Location: Germany
Re: DCP Conversion of UHD Blu-Ray files resulting in Colour being off
Pretty sure that these ops can be included in DCP-o-matic's color processing at some stage as well. Until then, nice to know these workarounds.