[FFmpeg-devel] [PATCH] avformat/movenc: add write_clli flag to write clli atom

Jan Ekström jeebjp at gmail.com
Thu Apr 2 00:33:55 EEST 2020


On Thu, Apr 2, 2020 at 12:19 AM Michael Bradshaw
<mjbshaw-at-google.com at ffmpeg.org> wrote:
>
> > On 4/1/2020 4:54 PM, Carl Eugen Hoyos wrote:
> > If there already are devices that support it, it should not be optional.
>
> There are, but these boxes aren't technically standardized for mp4/mov
> as far as I can tell. I'm reluctant (but not entirely opposed) to
> enable something by default that isn't formally specified.
>
> On Wed, Apr 1, 2020 at 2:07 PM James Almer <jamrial at gmail.com> wrote:
> > If anything, I'd rather have these boxes (clli and mdcv) written when
> > strict_std_compliance <= experimental than adding a new muxer option.
>
> `-strict -2` might have other side effects though. Also I think adding
> new muxer options are much more discoverable for users because you can
> see how to enable clli/mdcv with `-h full`. The write_clli/write_mdcv
> flags are meant to be temporary, anyway.
>
> On Wed, Apr 1, 2020 at 2:48 PM Jan Ekström <jeebjp at gmail.com> wrote:
> > If we want to enable possibly-MIAF-specific things in normal MP4, then
> > we could enable it by default already.
>
> If MIAF specifies both clli and mdcv and you can confirm we're writing
> them correctly then I could be convinced to skip the experimental
> phase in FFmpeg and just write them by default. I haven't bought a
> copy of MIAF but I will if it'll help us sort this out.

I took the liberty of sending an e-mail to the mp4-sys mailing list
governing ISOBMFF regarding the state of these boxes within 14496-12
specifically.

Surprisingly enough, I did get a response from Mr. Singer

On Thu, Apr 2, 2020 at 12:14 AM David Singer <> wrote:
>
> They are in process in an amendment to add to the video sample entry. Publication of 14496-12 has been blocked due to problems with ISO’s Registration Authority agreement.
>
> Once the FDIS text is approved, we will add to the RA.
>
> * * *
>
> 12.1.6   Content light level
> 12.1.6.1                 Definition
> This box provides information about the light level in the content. It is functionally equivalent to, and fully described in, the matching SEI in HEVC.
>
> 12.1.6.2                 Syntax
> class ContentLightLevelBox extends Box('clli'){
>    unsigned int(16) max_content_light_level;
>    unsigned int(16) max_pic_average_light_level;
> }
>
> 12.1.6.3                 Semantics
> max_content_light_level, max_pic_average_light_level are xx and yy as defined in Coding-Independent Code-Points
>
> 12.1.7   Mastering display colour volume
> 12.1.7.1                 Definition
> This box provides information about the colour primaries, white point, and mastering luminance in the content. It is functionally equivalent to, and fully described in, the matching SEI in HEVC.
>
> 12.1.7.2                 Syntax
> class MasteringDisplayColourVolumeBox extends Box('mdcv'){
>    for (c = 0; c<3; c++) {
>       unsigned int(16) display_primaries_x;
>       unsigned int(16) display_primaries_y;
>    }
>    unsigned int(16) white_point_x;
>    unsigned int(16) white_point_y;
>    unsigned int(32) max_display_mastering_luminance;
>    unsigned int(32) min_display_mastering_luminance;
> }
>
> 12.1.7.3                 Semantics
> display_primaries_x etc. are xx and yy as defined in Coding-Independent Code-Points
>
> 12.1.8   Content colour volume
> 12.1.8.1                 Definition
> This box describes the colour volume characteristics of the associated pictures. These colour volume characteristics are expressed in terms of a nominal range, although deviations from this range may occur. It is functionally equivalent to, and described in, the content colour volume SEI message in Rec. ITU-T H.265 | ISO/IEC 23008-2 except that the box, in a sample entry, applies to the associated content and hence the initial two bits (corresponding to the ccv_cancel_flag and ccv_persistence_flag) take the value 0. [[ed: do we need a timed metadata property also??]]
>
> NOTE      This is a Box, not a FullBox (similar to PixelAspectRatioBox).
>
> 12.1.8.2                 Syntax
> class ContentColourVolumeBox extends Box('cclv'){
>    unsigned int(1) reserved1 = 0;   // ccv_cancel_flag
>    unsigned int(1) reserved2 = 0;   // ccv_persistence_flag
>    unsigned int(1) ccv_primaries_present_flag;
>    unsigned int(1) ccv_min_luminance_value_present_flag;
>    unsigned int(1) ccv_max_luminance_value_present_flag;
>    unsigned int(1) ccv_avg_luminance_value_present_flag;
>    unsigned int(2) ccv_reserved_zero_2bits = 0;
>    if( ccv_primaries_present_flag ) {
>       for( c = 0; c < 3; c++ ) {
>          signed int(16) ccv_primaries_x[ c ];
>          signed int(16) ccv_primaries_y[ c ];
>       }
>    }
>    if( ccv_min_luminance_value_present_flag )
>       unsigned int(32) ccv_min_luminance_value;
>    if( ccv_max_luminance_value_present_flag )
>       unsigned int(32) ccv_max_luminance_value;
>    if( ccv_avg_luminance_value_present_flag )
>       unsigned int(32) ccv_avg_luminance_value;
> }


- Jan


More information about the ffmpeg-devel mailing list