I'm trying to build a python application to convert a 10bit DPX sequence to a 4k DNXHR_444 MOV with a Arri to Rec709 lut, just as I would in Davcincci resolve.
When comparing the output to the dpx in resolve with the lut on it, there is a slight colour shift making everything slightly more red. Even when i take the lut out of the ffmpeg code, there is still a slight redness. The colourmatrix helps a bit to get it closer but it isn't close enough. Any ideas why I can't get them to match?Code:ffmpeg -f image2 -framerate 24 -pattern_type glob -i INPUT.dpx -c:v dnxhd -profile:v dnxhr_444 -vf lut3d=ArriAlexa_LogCtoRec709_Resolve.cube,colormatrix=bt601:bt709 -pix_fmt yuv444p10le -c:a pcm_s16le -y -timecode 00:00:41:16 OUTPUT.mov
Here is a:
- JPG - reference of what the DPX + LUT should look like
- DPX - a frame of the dpx sequence I'm trying to convert to DNXHR_444
- the ArriLogC_to_Rec709 LUT to be applied to the DPX
Let me know if you need anything else.
https://drive.google.com/drive/folders/1j2Qq1sV5ZJJsMYe3DOFOV0dnQ3VIotcw?usp=sharing
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 4 of 4
Thread
-
-
The problem is the RGB => YUV conversion. And colormatrix is to be avoided if possible (8bit, quality issues)
In ffmpeg, zscale is the preferred method these days
This works ok, confirmed in Resolve 15, and other programs
eg.
Code:ffmpeg -i DPX(what_I_want_to_convert_to_DNXHR).dpx -vf lut3d=ArriAlexa_LogCtoRec709_Resolve.cube,zscale=matrix=709,format=yuv444p10le -c:v dnxhd -profile:v dnxhr_444 -an test_zscale.mov
-
Hey poisondeathray,
Sorry for my slow reply!
This worked perfectly! You're a legend thanks for that.
I'm trying to do a simlar conversion, but with 2K JPGs that already have the LUT baked in. When I do the same conversion, but take out the lut command and the change the profile to "dnxhr_hqx" and format to "yuv422p10le", the resulting MOV is darker then the jpgs as compared in resolve. The JPGs are 8bit so maybe that is why?
Any idea? I've messaged you a file from the jpg sequence.
ffmpeg -i JPG_sequence.jpg -vf zscale=matrix=709,format=yuv422p10le -c:v dnxhd -profile:v dnxhr_hqx -an test_zscale.mov
Cheers,
Josh -
jpeg is usually stored as "yuvj" or "full range" YUV . Your image is yuvj422p (422 subsampled YUV) . When it's "viewed" by some application , it's converted to RGB for display, with a full range conversion so everything looks normal
But when converting to a YUV video format, you typically have to scale the range from full range to limited ("video legal") range .
That's the main difference why it's "darker"; but jpeg usually uses "601" for the matrix by convention, so you have to adjust the matrix 601=>709 as well
Code:ffmpeg -i "INPUT.jpg" -vf zscale=matrixin=470bg:matrix=709:rangein=full:range=limited,format=yuv422p10le -c:v dnxhd -profile:v dnxhr_hqx -an test_jpg_zscale.mov
Similar Threads
-
MeGUI causing color shift
By koberulz in forum Newbie / General discussionsReplies: 11Last Post: 10th Feb 2017, 01:25 -
FFMPEG x265 10bit and virtualdub x265 10bit settings
By lilycarolyn in forum Video ConversionReplies: 11Last Post: 6th Jun 2016, 13:44 -
How do I compensate for a colour shift in an animated gif?
By Bruce Wayne in forum Video ConversionReplies: 16Last Post: 14th Apr 2016, 08:28 -
FFMPEG QUESTION :How do I take 10bit jpeg with FFMPEG?
By Jamaika in forum Video ConversionReplies: 10Last Post: 6th Jul 2015, 13:41 -
10 DPX to 10bit yuv (4:2:0) conversion
By Issusier in forum Video ConversionReplies: 5Last Post: 19th Nov 2014, 02:24