[FFmpeg-devel] [PATCH] movenc: write clap tag

Dave Rice dave at dericed.com
Mon Jul 10 02:12:55 EEST 2017


> On Jul 7, 2017, at 11:32 AM, Derek Buitenhuis <derek.buitenhuis at gmail.com> wrote:
> 
> On 7/7/2017 3:20 AM, Dave Rice wrote:
>> Resolves https://trac.ffmpeg.org/ticket/6145 and writes a clap atom that is coincident with the frames width and height.
>> 
>> 
>> From 23d80d0d47829fed61e817b1e7c3f6d420c9ab5c Mon Sep 17 00:00:00 2001
>> From: Dave Rice <dave at dericed.com>
>> Date: Thu, 6 Jul 2017 21:12:38 -0400
>> Subject: [PATCH] movenc: write clap tag
>> 
>> ---
>> libavformat/movenc.c | 19 +++++++++++++++++++
>> 1 file changed, 19 insertions(+)
> 
> Whoever pushes, add the ticket number into the commit message.
> 
> [...]
> 
>> +    avio_wb32(pb, 0); /* horizOff_N (= 0) */
>> +    avio_wb32(pb, 1); /* horizOff_D (= 1) */
>> +    avio_wb32(pb, 0); /* vertOff_N (= 0) */
>> +    avio_wb32(pb, 1); /* vertOff_D (= 1) */
> 
> Near as I can tell, these related the active image area? Is it useful to ever set
> this to anything but 0 (aka the whole image is active)?

Usually not a good idea to set a denominator to zero. The clap atom documentation at https://developer.apple.com/library/content/documentation/QuickTime/QTFF/QTFFChap3/qtff3.html#//apple_ref/doc/uid/TP40000939-CH205-125850 <https://developer.apple.com/library/content/documentation/QuickTime/QTFF/QTFFChap3/qtff3.html#//apple_ref/doc/uid/TP40000939-CH205-125850> specifies zero for numerators and one for denominators as default when the ratio of an actual aperture is not used.

> Was thinking of stuff like
> analogue video, a la http://chromashift.org/aspectratio/. I assume the answer is
> probably 'no’.

The atom is analogous to the PixelCrop* elements of Matroska. For instance a standard definition NTSC video may typically be digitized to a frame size of 720x486 but the active image might only be 704x480, so the aperture atom could express the difference.

> Patch itself LGTM.

[…] 

Thanks,
Dave Rice


More information about the ffmpeg-devel mailing list