Ticket #1485 (open enhancement)

Opened 11 months ago

Last modified 10 months ago

Support for Quicktime CLEF/TAPT atoms

Reported by: brams Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: mov
Cc: michael 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

quicktime_clef_tapt_support.patch Download (2.7 KB) - added by brams 11 months ago.
Patch for Quicktime CLEF/TAPT atom support
65759_cut.mov Download (2.4 MB) - added by cehoyos 11 months ago.
65759_orig_cut.mov Download (2.4 MB) - added by cehoyos 11 months ago.

Change History

Changed 11 months ago by brams

Patch for Quicktime CLEF/TAPT atom support

comment:1 Changed 11 months ago by cehoyos

  • Keywords mov added
  • Status changed from new to open

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

Changed 11 months ago by cehoyos

Changed 11 months ago by cehoyos

comment:2 Changed 11 months ago by cehoyos

  • 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 Changed 11 months ago by brams

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 Changed 11 months ago by cehoyos

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 Changed 10 months ago by michael

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 Changed 10 months ago by michael

  • Cc michael added
Note: See TracTickets for help on using tickets.