FORUMS: list search recent posts

DPX to prores 4444

COW Forums : Compression Techniques

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Seth Olson
DPX to prores 4444
on Jun 23, 2017 at 8:39:05 pm

I'm trying to convert a DPX sequence to ProRes 4444. The alpha works well, but the color shifts, and I don't know why. Here is the command line I am using:
ffmpeg -start_number 0000 -f image2 -r 23.98 -i C:\test\testy_%04d.dpx -codec:v prores_ks -profile:v 4444 -pix_fmt yuva444p10le -r 23.976 C:\test\testy_output\

I looked for a pix_fmt that started with RGB but didn't find one. I am rendering the DPX sequence out of After Effects using "trillions of colors+" (16bit?).

Return to posts index

Jorn Bergmans
Re: DPX to prores 4444
on Aug 14, 2017 at 1:19:47 pm

Hi there Seth,

So, the ProRes4444 format is a little weird, and a little weirder still in FFmpeg. Since it's nothing but a 'profile' to the prores_ks encoder, it works like any other Prores encode would, and that (plus some reverse engineering done on the Apple decoder) suggests that ProRes even at 4444 is an YUV / Y'CbCr codec. That's also what you told ffmpeg to export, and even when you input an rgb(a) it should default to yuva444p10le as the output:
(single frame output for example)
<b>ffmpeg -i ~/0001077.dpx -codec:v prores_ks -profile:v 4444 -pix_fmt gbrp12le -r 23.976 ~/</b>
ffmpeg version 3.3.3 Copyright (c) 2000-2017 the FFmpeg developers
--snip header--
Input #0, dpx_pipe, from ‘~/0001077.dpx':
Duration: N/A, bitrate: N/A
<b> Stream #0:0: Video: dpx, gbrp12le, 1920x1080 [SAR 1:1 DAR 16:9], 23.98 tbr, 25 tbn, 23.98 tbc</b>
Stream mapping:
Stream #0:0 -> #0:0 (dpx (native) -> prores (prores_ks))
Press [q] to stop, [?] for help
<b>Incompatible pixel format 'gbrp12le' for codec 'prores_ks', auto-selecting format 'yuv444p10le'</b>
<b>Output #0, mov, to '~/':</b>
encoder : Lavf57.71.100
<b> Stream #0:0: Video: prores (prores_ks) (ap4h / 0x68347061), yuv444p10le, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 23.98 fps, 11988 tbn, 23.98 tbc</b>
encoder : Lavc57.89.100 prores_ks
frame= 1 fps=0.0 q=-0.0 Lsize= 1321kB time=00:00:00.00 bitrate=130373686.7kbits/s speed=0.000376x
video:1320kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.054886%

Secondly, as far as I know, currently FFmpeg does not support encoding deeper than 10bit pixel formats. (as suggested by the 'p10le' tail on the pix_fmt you supplied in your arguments). Reading a deeper-than-10-bit ProRes file will also give you the estimated yuva444p10le pixel format.

So that is where the colorshift might originate from. And that's as much explanation as I can give you, considering I don't know the system you're working in or what color shift exactly happens.
If you need to encode to a mastering _video_ format in RGB, consider Apple Animation as it's a RLE (linear) encoder that supports RGB pixel information.
For windows, I think you'd be stuck exporting a 10bit uncompressed video? (Which will be giant in filesize)

Return to posts index

Jorn Bergmans
Re: DPX to prores 4444
on Aug 14, 2017 at 1:24:50 pm

as an aside, ffmpeg will display the supported pixel formats when you input:
ffmpeg -pix_fmts

You can pipe the output and grep to 'filter' strict rgb formats. Note that pixel ordening will mean they're not all labeled rgb, some will be bgr, grb, etc.
ffmpeg -pix_fmts | grep rgb

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 All Rights Reserved