Prores-BitDepth icon indicating copy to clipboard operation
Prores-BitDepth copied to clipboard

Legal vs. Full range.

Open richardssam opened this issue 1 year ago • 0 comments

I'm slightly surprised with the results for 10-bit prores since if you convert: ffmpeg -f image2 -framerate 24 -i /input_%05d.tiff -c:v prores_ks -profile (0-5) output.mov ffmpeg will be converting to a legal range, not using the full range. I'm guessing without seeing your code, that when you are using the AVFoundation library that you are some how giving it YUV values, rather than ffmpeg which is expecting rgb full range values, that need to be remapped to YUV legal range, where you will only be able to create 876 values (legal range is 64-940 for 10-bit).

I wonder if its actually using a higher bit-depth.

You can also use the toolbox conversion inside ffmpeg: ffmpeg -r 24 -start_number 1 -i ../TIFF_Files/Tiff10bit/10bit_%05d.tiff -vf "scale=in_color_matrix=bt709:out_color_matrix=bt709:in_range=full:out_range=tv" -c:v prores_videotoolbox -profile:v 5 -pix_fmt ayuv64le -color_range tv -colorspace bt709 -color_primaries bt709 -color_trc bt709 -y 4444xq_tv_ffmpeg.mov

Feeding that resulting quicktime through your tool, is also giving a value of 1021 values, which also is clearly wrong, if I'm hoping for a 10-bit legal range, which makes me think the file is actually 12-bit.

Regardless, its still an interesting test (so thanks!). I'm wondering about attempting something similar for some of the other formats.

richardssam avatar Jun 15 '23 11:06 richardssam