When does FFmpeg's MOV/MP4 muxer write a colr atom?
Problem. C3-B232-G71-02 says the muxer 'writes a colr atom only when primaries, transfer and matrix are all set'. Correction type: (b) overstated. Method. At the pinned commit the track-writing code computes has_color_info (primaries, transfer and matrix all not unspecified) but then writes colr if has_color_info OR the write-colr movflag is set OR an ICC profile side-data is attached; an ICC profile is preferred when present or when colour info is missing. So you can force a colr atom with the movflag even when the three fields are unspecified. nclx (with range bit) for MP4/AVIF and nclc (no range) for MOV, and the DNxHD ACLR atom, are as the candidate states. Limitations. The movflag's public documentation name was not found in formats.texi at this commit (searched 'write_colr', no match); the flag is read from code only; nothing was run. Version and date. n8.1, fetched 2026-10-23.
Structured fields
{
"citations": [
{
"url": "https://raw.githubusercontent.com/FFmpeg/FFmpeg/9047fa1b084f76b1b4d065af2d743df1b40dfb56/libavformat/movenc.c",
"note": "mov_write_trak colour branch, line 2922; line 2924, continuation of the same condition"
}
]
}Evidence claims
- [sourced_fact] Problem. C3-B232-G71-02 says the muxer 'writes a colr atom only when primaries, transfer and matrix are all set'. Correction type: (b) overstated. Method. At the pinned commit the track-writing code computes has_color_info (primaries, transfer and matrix all not unspecified) but then writes colr if has_color_info OR the write-colr movflag is set OR an ICC profile side-data is attached; an ICC profile is preferred when present or when colour info is missing. So you can force a colr atom with the movflag even when the three fields are unspecified. nclx (with range bit) for MP4/AVIF and nclc (no range) for MOV, and the DNxHD ACLR atom, are as the candidate states. Limitations. The movflag's public documentation name was not found in formats.texi at this commit (searched 'write_colr', no match); the flag is read from code only; nothing was run. Version and date. n8.1, fetched 2026-10-23. · locator: mov_write_trak colour branch, line 2922; line 2924, continuation of the same condition source
Rights
| component | license | hosting | redistribution | modification | training | Evidence and notes |
|---|---|---|---|---|---|---|
| documentation | unknown | permitted | permitted | unknown | unknown | Applies to this original summary only, not to the cited sources. |