Opened 12 years ago

Last modified 10 years ago

#1485 open enhancement

Support for Quicktime CLEF/TAPT atoms

Reported by: Bram Senders Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: mov
Cc: Michael Niedermayer Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

FFmpeg does not currently support the Quicktime CLEF (Track Clean Aperture Dimensions) and TAPT (Track Aperture Mode Dimensions) atoms. (See https://developer.apple.com/library/mac/#documentation/QuickTime/QTFF/QTFFChap2/qtff2.html) These atoms are necessary for detecting the correct dimensions for some videos, since they take precedence in Quicktime over the normal TKHD (track header) width/height and over the track PASP (pixel aspect ratio).

The attached patch adds support for these atoms. I can provide a sample video if desired.

Attachments (3)

quicktime_clef_tapt_support.patch (2.7 KB ) - added by Bram Senders 12 years ago.
Patch for Quicktime CLEF/TAPT atom support
65759_cut.mov (2.4 MB ) - added by Carl Eugen Hoyos 12 years ago.
65759_orig_cut.mov (2.4 MB ) - added by Carl Eugen Hoyos 12 years ago.

Change History (10)

by Bram Senders, 12 years ago

Patch for Quicktime CLEF/TAPT atom support

comment:1 by Carl Eugen Hoyos, 12 years ago

Keywords: mov added
Status: newopen

Please provide a sample and please consider sending patches to ffmpeg-devel, they generally receive more attention there.

by Carl Eugen Hoyos, 12 years ago

Attachment: 65759_cut.mov added

by Carl Eugen Hoyos, 12 years ago

Attachment: 65759_orig_cut.mov added

comment:2 by Carl Eugen Hoyos, 12 years ago

Reproduced by developer: set
$ ffmpeg -i 65759_orig_cut.mov
ffmpeg version N-41928-gc77bcbb Copyright (c) 2000-2012 the FFmpeg developers
  built on Jun 26 2012 09:35:11 with gcc 4.3.2
  configuration: --cc=/usr/local/gcc-4.3.2/bin/gcc --enable-gpl --enable-libopenjpeg --enable-libvorbis --enable-libspeex --enable-libmp3lame --enable-libtheora --extra-ldflags=-lm --enable-libvpx --enable-libxavs --enable-libfaac --enable-nonfree
  libavutil      51. 62.100 / 51. 62.100
  libavcodec     54. 29.100 / 54. 29.100
  libavformat    54. 11.100 / 54. 11.100
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     3.  0.100 /  3.  0.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '65759_orig_cut.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt
    creation_time   : 2009-06-07 10:53:58
    timecode        : 00:00:00:00
  Duration: 00:01:39.28, start: 0.000000, bitrate: 206 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 640x360, 2050 kb/s, SAR 10000:7031 DAR 160000:63279, 25 fps, 25 tbr, 2500 tbn, 5k tbc
    Metadata:
      creation_time   : 2009-06-07 10:53:58
      handler_name    : Module de gestion vid�o
    Stream #0:1(eng): Data: none (tmcd / 0x64636D74)
    Metadata:
      creation_time   : 2009-06-07 10:53:58
      handler_name    : Gestionnaire code temporel
      timecode        : 00:00:00:00
    Stream #0:2(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 114 kb/s
    Metadata:
      creation_time   : 2009-06-07 10:53:58
      handler_name    : Module de gestion sonore
At least one output file must be specified

With the patch:

$ ffmpeg -i 65759_orig_cut.mov
ffmpeg version N-41929-g6eff277 Copyright (c) 2000-2012 the FFmpeg developers
  built on Jun 26 2012 10:46:13 with gcc 4.3.2
  configuration: --cc=/usr/local/gcc-4.3.2/bin/gcc --enable-gpl --enable-libopenjpeg --enable-libvorbis --enable-libspeex --enable-libmp3lame --enable-libtheora --extra-ldflags=-lm --enable-libvpx --enable-libxavs --enable-libfaac --enable-nonfree
  libavutil      51. 62.100 / 51. 62.100
  libavcodec     54. 29.100 / 54. 29.100
  libavformat    54. 11.100 / 54. 11.100
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     3.  0.100 /  3.  0.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '65759_orig_cut.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt
    creation_time   : 2009-06-07 10:53:58
    timecode        : 00:00:00:00
  Duration: 00:01:39.28, start: 0.000000, bitrate: 206 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 640x360, 2050 kb/s, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 2500 tbn, 5k tbc
    Metadata:
      creation_time   : 2009-06-07 10:53:58
      handler_name    : Module de gestion vid�o
    Stream #0:1(eng): Data: none (tmcd / 0x64636D74)
    Metadata:
      creation_time   : 2009-06-07 10:53:58
      handler_name    : Gestionnaire code temporel
      timecode        : 00:00:00:00
    Stream #0:2(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 114 kb/s
    Metadata:
      creation_time   : 2009-06-07 10:53:58
      handler_name    : Module de gestion sonore
At least one output file must be specified

comment:3 by Bram Senders, 12 years ago

I see you already uploaded the same sample I was going to provide, nice :-) Should I still also mail this to the list?

comment:4 by Carl Eugen Hoyos, 12 years ago

A patch on ffmpeg-devel generally receives more attention, so if you want the patch included, it may make sense to send it to the list. Please don't forget to clarify if you wrote the patch yourself or add credits.

comment:5 by Michael Niedermayer, 12 years ago

To duplicate the comment from the ML:
This patch worsens the aspect ratio of the sample from:
https://ffmpeg.org/trac/ffmpeg/ticket/1439

the center circle looks more round before this patch than afterwards


Do you have time to investigate this and submit a patch that does not cause regressions ?

comment:6 by Michael Niedermayer, 12 years ago

Cc: Michael Niedermayer added

comment:7 by Carl Eugen Hoyos, 10 years ago

http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/146783
I wonder how the sample from ticket #1439 signals that the Clean Aperture Dimensions are to be used on an active area of 702x576, I only found dimensions of 720x576 (and the display dimension of 1024x576) in the file.

Note: See TracTickets for help on using tickets.