Opened 5 years ago
Last modified 3 years ago
#8074 open defect
movflags write_colr not working for ProRes encoded mov files
Reported by: | en5ca | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | git-master | Keywords: | mov regression |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
Movflags write_colr not working for Prores encoded mov files. Works with h264 encoding. Output shows the color metadata to be written, but it's not readable with ffprobe or ffmpeg, or any other software. Doesn't seem to work in 4.1, 4.2 or git-master, but works in 4.0.
How to reproduce:
ffmpeg -f lavfi -i testsrc=duration=10:size=1920x1080:rate=24000/1001 -pix_fmt yuv422p10le -colorspace bt709 -color_primaries bt709 -color_trc bt709 -movflags write_colr -c:v prores_ks -profile:v hq testsrc.mov ffprobe -i testsrc.mov -show_streams ffmpeg version 4.1.4
Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.
Attachments (4)
Change History (14)
by , 5 years ago
Attachment: | ffmpeg.log added |
---|
comment:1 by , 5 years ago
Component: | ffmpeg → avformat |
---|
follow-up: 3 comment:2 by , 5 years ago
Keywords: | mov regression added |
---|---|
Version: | 4.1.4 → unspecified |
Please test current FFmpeg git head, the only version supported on this bug tracker.
comment:3 by , 5 years ago
Replying to cehoyos:
Please test current FFmpeg git head, the only version supported on this bug tracker.
Tested. Not working. Noticed that instead of writing any colorspace metadata, it always writes limited color range tag. I will add more recent log files.
follow-up: 5 comment:4 by , 5 years ago
Quicktime (MOV) files don't store colour range. See http://ffmpeg.org/pipermail/ffmpeg-user/2018-November/042154.html
follow-up: 7 comment:5 by , 5 years ago
Replying to Gyan:
Quicktime (MOV) files don't store colour range. See http://ffmpeg.org/pipermail/ffmpeg-user/2018-November/042154.html
That makes it stranger. But indeed, trying to add 709 colorspace metadata results in a file, which shows up as unknown colorspace and limited/tv color data levels, at least when examined with ffprobe. A certain 3rd party software interpret the file as 601 colorspace, which leads to noticeable color shift.
comment:6 by , 5 years ago
Version: | unspecified → git-master |
---|
comment:7 by , 5 years ago
Replying to en5ca:
Replying to Gyan:
Quicktime (MOV) files don't store colour range. See http://ffmpeg.org/pipermail/ffmpeg-user/2018-November/042154.html
That [...]
read through. if i understood correctly that was about adding color range metadata to prores encoded video in mov container, which apparently isnt supported. im trying to add color space/primaries/transfer characteristics, but instead ffmpeg adds tv/mpeg/limited color range and progressive field order metadata tags, and none of the intended color tags. pointing out this problem occurs only with git master/later versions of ffmpeg. and affects at least prores, dnxhd/dnxhr and uncompressed (v210) yuv422 encoding/muxing to mov/quicktime. ffmpeg seems to leave out the color space/trc/prim data, and arbitrarily adds either field order progressive or color range tv, or both, metadata tags. compared with davinci resolve produced files, and it seems to correctly add the space/trc/prim metadatas to mov, and ffprobe also reads them correctly, so the problem probably lies somewhere in muxing the mov with ffmpeg.
comment:8 by , 3 years ago
Status: | new → open |
---|
Quicktime (MOV) files don't store colour range
They can store it in Rnge box. https://stackoverflow.com/questions/54405405/how-to-force-full-range-flag-on-export
Now that we fixed some files like (in ffplay too, see e645a1ddb90a863e129108aad9aa7e2d417f3615) https://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket524/AVCI50.mov that is full range...
Do we have Rnge box samples with ProRes?
But you are wrong that movflags write_colr writes nothing (and it is default now if you specify all 3 things, matrix, trc and primaries): use exiftool
Color Representation : nclc 1 1 1
Color Representation : nclc 1 16 1
for PQ also works (just change to -color_trc smpte2084)
comment:9 by , 3 years ago
I will also point out two points here: first of all the command above does not write bt709 type of YCbCr, it just tags the output to decode like that. You need to specify -vf scale=out_color_matrix=bt709 for that.
Also this thing appears to be working (matrix bt.709 is indeed correctly decoding stuff).
ffmpeg -f lavfi -i testsrc=duration=10:size=1920x1080:rate=24000/1001 -vf scale=out_color_matrix=bt709 -pix_fmt yuv422p10le -colorspace bt709 -color_primaries bt709 -color_trc bt709 -movflags write_colr -c:v prores_ks -profile:v hq testsrc.mov
but this does not ffmpeg -f lavfi -i testsrc=duration=10:size=1920x1080:rate=24000/1001 -vf scale=out_color_matrix=bt2020 -pix_fmt yuv422p10le -colorspace bt2020nc -color_primaries bt709 -color_trc bt709 -movflags write_colr -c:v prores_ks -profile:v hq testsrcprores3.mov
comment:10 by , 3 years ago
In some way it is also a duplicate of #8862, since behaviour changes with workaround there.
ffmpeg log