Davinci Export Color Shifting when using NVIDIA encoder

Get answers to your questions about color grading, editing and finishing with DaVinci Resolve.
  • Author
  • Message
Offline

nbenson

  • Posts: 12
  • Joined: Mon Mar 27, 2023 5:28 pm
  • Real Name: Nathan Benson

Davinci Export Color Shifting when using NVIDIA encoder

PostWed Mar 29, 2023 2:30 am

When exporting using the NVIDIA encoder, the colors become over-saturated and are heavily tinted red. When I use the native encoder, the colors are consistent with the DaVinci Resolve preview window and are displayed properly. Unfortunately, while the native encoder permits HDR metadata, it does not permit 10-bit rendering, which is why I need to use the NVIDIA encoder. If anyone was wondering, I have tested it with the project settings set to DaVinci YRGB Color Managed and regular DaVinci YRGB.

I will note that the NIVIDA encoder does correctly output the color if I set the Color Space Tag to P3-D65 and the Gamma Tag to anything else (Gamma 2.4 selected) in the Advanced Settings of the deliver page. However, this does not fulfill my needs as I wish the output to be in the "BT 2020, ST2084 1000 nit" color space, and the color shifting occurs when selecting that aforementioned color space with the NVIDIA encoder.

I am using a RTX 3060 Ti with a 13600k for exporting.

All details are posted in the image below which includes MediaInfo info, sample output images from the NVIDIA and native encoders, and project settings.
Attachments
davinci-resolve.png
DaVinci Resolve Studio 18 Info
davinci-resolve.png (462.59 KiB) Viewed 1502 times
Offline
User avatar

waltervolpatto

  • Posts: 10503
  • Joined: Thu Feb 07, 2013 5:07 pm
  • Location: 1146 North Las Palmas Ave. Hollywood, California 90038 USA

Re: Davinci Export Color Shifting when using NVIDIA encoder

PostWed Mar 29, 2023 3:03 am

one seems limited and the other full range....
W10-19043.1645- Supermicro MB C9X299-PGF - RAM 128GB CPU i9-10980XE 16c 4.3GHz (Oc) Water cooled
Decklink Studio 4K (12.3)
Resolve 18.5.1 / fusion studio 18
GPU 3090ti drivers 512.59 studio
Offline

Mads Johansen

  • Posts: 866
  • Joined: Mon Dec 19, 2016 10:51 am

Re: Davinci Export Color Shifting when using NVIDIA encoder

PostWed Mar 29, 2023 3:32 am

When you put both files back in Resolve, is the scopes different at that particular frame?
Davinci Resolve Studio 18.6.6 Build 7, Windows 11, Nvidia 3060 TI, 551.86 Studio
Offline

nbenson

  • Posts: 12
  • Joined: Mon Mar 27, 2023 5:28 pm
  • Real Name: Nathan Benson

Re: Davinci Export Color Shifting when using NVIDIA encoder

PostWed Mar 29, 2023 4:14 am

The scopes are nearly identical in all displays except CIE Chromaticity where they slightly differ (see first image below). I did notice that the exports looked identical in the DaVinci Resolve timeline when imported but have dramatic differences when viewed in an external player such as VLC. I did notice that unlike MediaInfo, VLC did not display the color information in the native encoding file as it did in the nvidia encoding file (see second image below), so I am guessing that it has something to do with the color settings not being properly transmitted in the NVIDIA encoder.
Attachments
vlc-codec.png
VLC Codec Info
vlc-codec.png (30.82 KiB) Viewed 1400 times
scopes.png
Scopes
scopes.png (279.14 KiB) Viewed 1400 times
Offline
User avatar

Marc Wielage

  • Posts: 10914
  • Joined: Fri Oct 18, 2013 2:46 am
  • Location: Hollywood, USA

Re: Davinci Export Color Shifting when using NVIDIA encoder

PostWed Mar 29, 2023 7:45 am

Export :10 seconds of SMPTE color bars, bring that file back into Resolve and look at it on the scopes. If the levels are the same, then it's not changing. If the levels are changing, something is very wrong.
marc wielage, csi • VP/color & workflow • chroma | hollywood
Offline

nbenson

  • Posts: 12
  • Joined: Mon Mar 27, 2023 5:28 pm
  • Real Name: Nathan Benson

Re: Davinci Export Color Shifting when using NVIDIA encoder

PostWed Mar 29, 2023 8:56 am

The colors look the same when imported into DaVinci Resolve. It is outside DaVinci that they differ. When playing the NVIDIA and native renders inside Resolve, they have identical colors, but when playing them outside of Resolve in VLC for example, the native export retains the proper coloring but the NVIDIA export does not.
Offline
User avatar

shebbe

  • Posts: 1013
  • Joined: Tue Mar 06, 2018 11:48 am
  • Location: Amsterdam
  • Real Name: Shebanjah Klaasen

Re: Davinci Export Color Shifting when using NVIDIA encoder

PostWed Mar 29, 2023 12:56 pm

I would double check what Walter already mentioned. One looks to be incorrectly interpreted data level wise. Try setting the nvidia encode export to Full instead of Auto and another one as Video and check the results.
Home System Resolve 18.6b9: Z790 / i9 13900K / 64GB DDR5 / RTX4090 / Win 11 / ASUS PA32UGC 1600 nits
Office System Resolve 18.6b9: X570 / Ryzen 9 5900X / 128GB DDR4 / RTX4090 / Win 11 / EIZO CG248-K
Offline

nbenson

  • Posts: 12
  • Joined: Mon Mar 27, 2023 5:28 pm
  • Real Name: Nathan Benson

Re: Davinci Export Color Shifting when using NVIDIA encoder

PostWed Mar 29, 2023 5:25 pm

The color differences remain, regardless if the data levels are set to full or video. The problem most likely has to do with color space metadata in my judgement. I just can't figure out how to fix that metadata.
Offline

Mads Johansen

  • Posts: 866
  • Joined: Mon Dec 19, 2016 10:51 am

Re: Davinci Export Color Shifting when using NVIDIA encoder

PostWed Mar 29, 2023 7:36 pm

Doesn't rec 2020 require 10 bit?
Yes it does: "Rec. 2020 defines a bit depth of either 10 bits per sample or 12 bits per sample." ( https://www.itu.int/dms_pubrec/itu-r/re ... !PDF-E.pdf page 6, "For practical purpose, the following values can be used: α = 1.099 and β = 0.018 for 10-bit systems α = 1.0993 and β = 0.0181 for 12-bit systems" )


So we're down to a "what does VLC do with a 10 bit color space and an 8 bit file" question.

(The solution to that particular problem is to select Main10 or Main 4:4:4 10 as the Encoding profile).
Davinci Resolve Studio 18.6.6 Build 7, Windows 11, Nvidia 3060 TI, 551.86 Studio
Offline

Jim Simon

  • Posts: 29830
  • Joined: Fri Dec 23, 2016 1:47 am

Re: Davinci Export Color Shifting when using NVIDIA encoder

PostWed Mar 29, 2023 11:38 pm

Try these settings (changing only Resolution, Frame rate and Keyframes accordingly).

Report back.

HDR Deliver.png
HDR Deliver.png (63.64 KiB) Viewed 1204 times
My Biases:

You NEED training.
You NEED a desktop.
You NEED a calibrated (non-computer) display.
Offline

nbenson

  • Posts: 12
  • Joined: Mon Mar 27, 2023 5:28 pm
  • Real Name: Nathan Benson

Re: Davinci Export Color Shifting when using NVIDIA encoder

PostThu Mar 30, 2023 8:33 am

Unfortunately, the color change still occurs with these settings (my settings are slightly altered, see image below). The only time I can get the colors to shift is when changing the Color Space Tag and Gamma Tag. For reference, my input video is a Rec.709 import that I didn't shoot, and only when adjusting the Color Space Tag to Rec.709/P3-D60/P3-D65/P3-DCI and the Gamma Tag to Gamma 2.2/2.4/2.6 do the colors look accurate according to the shown image. Unfortunately, these color spaces do not carry HDR metadata or 10-bit color, so they are not optional.

I tried playing the output video with VLC (with different Video output modules selected), Quicktime (on Mac and Windows), and Jellyfin (even the tone mapping wouldn't display the proper colors). I am thinking it has something to do with how I imported the media into DaVinci, like not adding LUTs to transform the gamma or using the Color Space Transform Node. However, my attempts at fixing the color space just so that the export matches the timeline viewer are still unfruitful.
Attachments
export.png
Export Settings
export.png (74.92 KiB) Viewed 1171 times
Offline

Jim Simon

  • Posts: 29830
  • Joined: Fri Dec 23, 2016 1:47 am

Re: Davinci Export Color Shifting when using NVIDIA encoder

PostThu Mar 30, 2023 7:22 pm

nbenson wrote:I tried playing the output video with VLC
That's not ideal.

Bring the export back into Resolve for direct comparison.
My Biases:

You NEED training.
You NEED a desktop.
You NEED a calibrated (non-computer) display.
Offline

nbenson

  • Posts: 12
  • Joined: Mon Mar 27, 2023 5:28 pm
  • Real Name: Nathan Benson

Re: Davinci Export Color Shifting when using NVIDIA encoder

PostThu Mar 30, 2023 10:00 pm

The problem is the export looks fine in DaVinci Resolve, but it doesn't look the same in any external player. No external player can properly play the output whereas every other H.265 video I've played has proper coloring. The export isn't behaving properly for viewing environments outside of Resolve.
Offline
User avatar

waltervolpatto

  • Posts: 10503
  • Joined: Thu Feb 07, 2013 5:07 pm
  • Location: 1146 North Las Palmas Ave. Hollywood, California 90038 USA

Re: Davinci Export Color Shifting when using NVIDIA encoder

PostFri Mar 31, 2023 1:01 am

Is one interpreted as HDR and the other SDR? Or in other words, the HDR tag is not correctly seeing?
W10-19043.1645- Supermicro MB C9X299-PGF - RAM 128GB CPU i9-10980XE 16c 4.3GHz (Oc) Water cooled
Decklink Studio 4K (12.3)
Resolve 18.5.1 / fusion studio 18
GPU 3090ti drivers 512.59 studio
Offline

nbenson

  • Posts: 12
  • Joined: Mon Mar 27, 2023 5:28 pm
  • Real Name: Nathan Benson

Re: Davinci Export Color Shifting when using NVIDIA encoder

PostFri Mar 31, 2023 3:35 am

If you are referring to the timeline, all clips show an HDR setting in their bottom right. However, they were imported as Rec.709 H.264 so the HDR might not be properly applying, even though the output color space is Rec.2020. When testing on my MacBook Air (where I'm having issues is Windows), I was able to get the colors in the viewer and the export to match, but in that case, the viewer acquired the over-saturated colors. In other words, my viewer became over-saturated which lined up with my export. This only occurred when I turned on the "Use Mac display color profiles for viewers", and I'm unsure if there is an equivalent setting on Windows.
Online
User avatar

Uli Plank

  • Posts: 21292
  • Joined: Fri Feb 08, 2013 2:48 am
  • Location: Germany and Indonesia

Re: Davinci Export Color Shifting when using NVIDIA encoder

PostFri Mar 31, 2023 5:16 am

No, an iGPU is not enough, and you can't use HEVC 10 bit 4:2:2 in the free version.

Studio 18.6.5, MacOS 13.6.5
MacBook M1 Pro, 16 GPU cores, 32 GB RAM and iPhone 15 Pro
Speed Editor, UltraStudio Monitor 3G, iMac 2017, eGPU
Offline

Jim Simon

  • Posts: 29830
  • Joined: Fri Dec 23, 2016 1:47 am

Re: Davinci Export Color Shifting when using NVIDIA encoder

PostFri Mar 31, 2023 2:47 pm

nbenson wrote:The problem is the export looks fine in DaVinci Resolve, but it doesn't look the same in any external player.
Software players often can and do alter the image. That's why they're unreliable for this.

If it looks correct on a calibrated display from hardware player, you've done the job well.

If any other playback situation doesn't look the same, then you need to correct the playback situation, not the work.
My Biases:

You NEED training.
You NEED a desktop.
You NEED a calibrated (non-computer) display.
Offline

Steve Alexander

  • Posts: 4517
  • Joined: Mon Mar 23, 2015 2:15 am

Re: Davinci Export Color Shifting when using NVIDIA encoder

PostFri Mar 31, 2023 2:57 pm

Jim Simon wrote:
nbenson wrote:The problem is the export looks fine in DaVinci Resolve, but it doesn't look the same in any external player.
Software players often can and do alter the image. That's why they're unreliable for this.

If it looks correct on a calibrated display from hardware player, you've done the job well.

If any other playback situation doesn't look the same, then you need to correct the playback situation, not the work.

The software players often make an assumption about the color space and gamma rather than reading the embedded tagging. For example, a 1:2:1 (rec 709 gamma 2.4) may be ignored and assumed to be 1:1:1 (rec 709 gamma 1.95), so changing your output color space and tags to match the assumption will also sometimes correct the issue, but not across all players since the assumed color space and gamma may not be the same across all players and all OSs.
Time Traveller
Resolve Studio 18.6.6 | Fusion Studio 18.6.6 | Win 11 Pro (22H2) | i9-7940x, P4000 (536.96, 8GB VRAM), 64GB RAM, M.2 boot, SSD scratch, RAID10 data | (laptop) 16" MacBook Pro M1 MAX, 32 GPU cores, 64 GB RAM, 2 TB SSD, Sonoma 14.4
Offline

nbenson

  • Posts: 12
  • Joined: Mon Mar 27, 2023 5:28 pm
  • Real Name: Nathan Benson

Re: Davinci Export Color Shifting when using NVIDIA encoder

PostFri Mar 31, 2023 4:46 pm

The problem is, any other H.265 BT.2020 ST2084 video I have ever played (Blu-Ray rips) has proper coloring in both DaVinci, VLC, and Quicktime, so I am worried that the output is just being improperly displayed in DaVinci.

I don't have a proper calibrated display to test this on, just a 95% DCI-P3 300nit monitor that is HDR. Even though it shouldn't show brightness correctly, it should show color correctly. I'm just trying to get my output to be consistent with my input so that I know the colors are accurate and don't have to re-encode in the future when I get a proper monitor. From what I understand, this should be possible on a monitor of that caliber, at least to a reasonable degree, and I am just trying to configure DaVinci Resolve to properly display those colors. For all I know, the over-saturated picture I get is a result of the conversion from Rec.709 to Rec.2020 or from Gamma 2.4 to ST2084 but I wouldn't have any good way of knowing and correcting for it unless DaVinci properly displayed the video.
Offline

nbenson

  • Posts: 12
  • Joined: Mon Mar 27, 2023 5:28 pm
  • Real Name: Nathan Benson

Re: Davinci Export Color Shifting when using NVIDIA encoder

PostThu Apr 06, 2023 9:43 pm

I just got a Mini Monitor and discovered that the turned on setting causing all of my color shifting problems was the "Project Settings > Master Settings > Video Monitoring > Enable HDR Metadata". Can anyone explain what this Enable HDR Metadata setting does, how it affects the video, and if it is required for HDR Grading?

Return to DaVinci Resolve

Who is online

Users browsing this forum: BartReynaard, drikin, EvilSaiga, Heusfilm, tobydoyle, Uli Plank and 235 guests