[FFmpeg-devel] [PATCH] mov tkhd' width and height usage

Maksym Veremeyenko verem
Mon Jan 17 13:51:44 CET 2011


by default mov muxer setup width and height fields of *tkhd* atom as 
visual representation of track that is mentioned in *ISO/IEC 14496-12* 

width and height specify the track's visual presentation size as 
fixed-point 16.16 values. These
    need not be the same as the pixel dimensions of the images, which is 
documented in the sample
    description(s); all images in the sequence are scaled to this size, 
before any overall transformation of
    the track represented by the matrix. The pixel dimensions of the 
images are the default values.

but *QuickTime File Format Specification* do not mention about it:

Track width
        A 32-bit fixed-point number that specifies the width of this 
track in pixels.
Track height
        A 32-bit fixed-point number that indicates the height of this 
track in pixels.

As result some software fault because of it want to read 768x576 plane 
instead of 720x576. Furthermore QuickTime, FinalCut, Flipfactory set 
width and height of *tkhd* equal to codec's width and height on exported 
mov files.

Would it be a solution to set width and height equal to codec parameter 
for mov format only (not mp4 etc..), please find attached patch...

Maksym Veremeyenko

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mov-tkhd-width_height.patch
Type: text/x-patch
Size: 909 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110117/bdfb45eb/attachment.bin>

More information about the ffmpeg-devel mailing list