[FFmpeg-devel] [PATCH] lavf/movenc: Write 'dby1' minor brand if Dolby content is being muxed to MP4

Derek Buitenhuis derek.buitenhuis at gmail.com
Thu Sep 30 17:51:31 EEST 2021


On 9/29/2021 8:30 PM, Jan Ekström wrote:
> I do dislike it how outside of the DoVi pdf they don't really seem to
> specify 'dby1', but the mp4 registration authority's description goes
> all the way back to January 2017 with this identifier
> (https://github.com/mp4ra/mp4ra.github.io/blob/a27f402652b57cea190a33f6955a843869fdd457/filetype.html).
> 
> f.ex. none of the following seem to mention the 'dby1' brand:

I know, but I am inclined to follow the MP4A here.

>> +        AVDOVIDecoderConfigurationRecord *dovi = (AVDOVIDecoderConfigurationRecord *)
>> +                                                     av_stream_get_side_data(st, AV_PKT_DATA_DOVI_CONF, NULL);
> 
> Maybe something a la the following to keep the line length shorter?

[...]

>> +        if (dovi || st->codecpar->codec_id == AV_CODEC_ID_AC3 ||
>> +            st->codecpar->codec_id == AV_CODEC_ID_EAC3 || st->codecpar->codec_id == AV_CODEC_ID_TRUEHD)
>> +            has_dolby = 1;
> 
> Maybe something a la the following to keep the line length shorter
> (and also the codec_id checks aligned)?
> +        if (dovi ||
> +            st->codecpar->codec_id == AV_CODEC_ID_AC3 ||
> +            st->codecpar->codec_id == AV_CODEC_ID_EAC3 ||
> +            st->codecpar->codec_id == AV_CODEC_ID_TRUEHD)

I've changed it to what Andreas sugested in v2, which should
satisify this.

> (I think the next step around this code would almost be a switch/case
> thing since we've got multiple of them now :D)
> 
> Otherwise LGTM.

v2 sent.

- Derek


More information about the ffmpeg-devel mailing list