myffmpeg question on color spaces

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

Chris Holmes

  • Posts: 35
  • Joined: Wed Dec 20, 2017 7:17 am

myffmpeg question on color spaces

PostTue Jun 05, 2018 7:01 am

Hi all,

A question for the ffmpeg gurus out there....
I am using myffmpeg to convert DNXHR files to prores and h.264 for upload to Vimeo and Youtube. The videos seem to look ok, but I just wanted to verify the color option settings in myffmpeg. Vimeo will alert me with a warning that it doesn't know what the color space is.
The 4 color options in myffmpeg of Color Primaries, Color Transfert Characteristic,Colorspace, and Color Range are all set to Default. The resulting video says it is YUV, the original was rec709. Should I change these to say BT.709? Does changing this simply change the metadata or is ffmpeg likely changing the color space with the default settings?
Thx,

C
System Info
Resolve Studio 14.3
Windows 10 Pro version 1709
SuperMicro 7048GR-TR
Dual 18 Core / 4x 1080ti / Cubix Xpndr
Offline

Peter Fleming

  • Posts: 75
  • Joined: Sat Nov 18, 2017 3:08 am

Re: myffmpeg question on color spaces

PostTue Jun 05, 2018 10:10 am

I would suggest you add the correct color matrix.
I use either AnotherGUI (which is freeware and has many advantages for me) or ffmpeg under dos(Windows10 Pro) to do my encoding.
For HD you need to add;
-x264-params "colorprim=bt709 :colormatrix=bt709:transfer=bt709" to get the correct color matrix.
UHD and SD use a different matrix.
Hope this helps
Windows 10 Pro 64-bit
Intel Core i7 Coffee Lake @ 3.70GHz
32.0GB Dual-Channel DDR4 @ 1600MHz
Z370 AORUS Gaming 5-CF
4095MB NVIDIA GeForce RTX 2070
223GB Western Digital SSD
3726GB Western Digital WDC
5589GB INTEL SSDSC2BW120A4
Offline

Andrew Kolakowski

  • Posts: 9535
  • Joined: Tue Sep 11, 2012 10:20 am
  • Location: Poland

Re: myffmpeg question on color spaces

PostTue Jun 05, 2018 10:38 am

Color matrix won't matter if you not going out of YUV format. When ffmpeg converts between YUV formats (eg. 4:2:2 to 4:2:0 or 10bit to 8bit) then this info is irrelevant. It becomes very important when you trying to output to RGB based format.
If you making some HD h264 files (Rec.709 graded) you ideally wan't to make sure Rec.709 flagging is there.
Offline
User avatar

Cary Knoop

  • Posts: 1654
  • Joined: Sun Mar 12, 2017 6:35 pm
  • Location: Newark, CA USA

Re: myffmpeg question on color spaces

PostTue Jun 05, 2018 2:48 pm

Peter Fleming wrote:UHD and SD use a different matrix.

Not necessarily!

And treating this as some hard rule will and has caused a lot of problems.

While SD is older than HD which is older than UHD and while Rec601 is older then Rec709 which is older then Rec2020 you should not assume that color spaces "match" the resolution.

The best that you can do is to always set a flag.

Return to DaVinci Resolve

Who is online

Users browsing this forum: Daniel Batinic, RowbyGoren and 306 guests