[FFmpeg-devel] [PATCH v3 00/25] Add timed metadata tracks, track references, channel layout

Erkki Seppälä erkki.seppala.ext at nokia.com
Mon Sep 19 16:25:23 EEST 2016

Hello again!

Here is the patch set version 3 with the goal of adding the following
features to the ISO base media file format support of FFmpeg (also
available at

- This patchset is still against the same version of FFmepg as before,
  but it merges cleanly over current master.
- Reordered patches so that distinct features are not interleaved at
  all, with Changelog entries separating them. (The side data
  enumeration is still matches the original order.)

  This was done to encourage merging this patch piece-wise :). (In
  particular my personal projects might benefit from the timed
  metadata changes..)

- Hardened code dealing with side data (mov_tref_copy_from_side_data,
  mov_write_chnl_tag). This includes replacing some av_assert0 with
  return AVERROR(EINVAL).  Movenc.c however does not yes pass errors
- Read the ISO tkhd's alternate_group into AV_PKT_DATA_TRACK_ALTERNATE_GROUP
  This is done only with mov.c option "read_alternate_group" as to not
  affect default FFmpeg functionality.
- Fixed memory bug in meta_encode
- Fixed comment style to match the used style (doxygen)
- Fixed messing up with the amount of whitespace
- Renamed AVTimedMetadata to AVTimedMetadataInfo to match the enumeration name
- Split meta_encode/meta_decode to separate files
- Renamed long_name "Metadata Decoder" to "Timed Metadata Decoder"
  (and Encoder correspondingly)
- Removed references to AV_CODEC_ID_META from ff_*_muxer as to not
  change the default ffmpeg tool functionality
- Updated configure-script to include references to the two examples
- Added parsing for ISO23001-8 chnl boxes (to side data) as
  mov_read_chnl. This means the 'chnl' box can be copied along the
  rest of the track with ffmpeg
- Fixed crash introduced by channel side data handling when there was
  no side data for chnl..

Erkki Seppälä (25):
  avformat/movenc: mov_write_ftyp_tag: write the major brand as a
    compatible brand
  Updated Changelog
  avformat/movenc: support for multiple and client-provided track
  avformat/mov, isom: read (multiple) track references (tag and multiple
  Updated Changelog
  avcodec/avcodec, avformat/movenc: introduced
    AV_PKT_DATA_TRACK_ALTERNATE_GROUP side data for expressing alternate
  avformat/mov: mov_read_tkhd stores alternate group to
  Updated Changelog
  avcodec/metaenc, metadec: added an encoder/decoder for timed metadata
  avformat/movenc: deal with AVMEDIA_TYPE_DATA by using AV_CODEC_ID_META
  avformat/movenc: add the urim sample descriptor
  avformat/movenc, isom: support metadata in mp4 files
  avcodec/utils: do_decode now supports AVMEDIA_TYPE_DATA
  avcodec/utils: do_encode now supports AVMEDIA_TYPE_DATA
  avformat/mov: basic support for identifying (and reading) timed
  avformat/mov: ff_mov_read_stsd_entries now deals with
  avformat/mov: read urim metadata from meta
  Updated Changelog
  avcodec/avcodec, avformat/movenc: support embedding channel layout to
    stream side data
  avformat/movenc: mov_write_audio_tag can write the proper number of
    channels, not the hardcoded 2
  avformat/mov: read the chnl box as side data
  avutil: added channel_layout_isoiec23001_8.h to HEADERS
  Updated Changelog
  doc/examples/extract_timed_metadata: added a bare-bones metadata
    extractor; find only the frames
  doc/examples/muxing_with_metadata: example for dealing with timed meta

 Changelog                                |  15 +
 configure                                |   8 +-
 doc/examples/Makefile                    |   3 +
 doc/examples/extract_timed_metadata.c    | 230 ++++++++
 doc/examples/muxing_with_metadata.c      | 885 +++++++++++++++++++++++++++++++
 libavcodec/Makefile                      |   2 +
 libavcodec/allcodecs.c                   |   3 +
 libavcodec/avcodec.h                     | 118 ++++-
 libavcodec/codec_desc.c                  |   8 +
 libavcodec/metadec.c                     |  59 +++
 libavcodec/metaenc.c                     |  58 ++
 libavcodec/utils.c                       |   6 +
 libavformat/Makefile                     |   4 +-
 libavformat/isom.c                       |   7 +
 libavformat/isom.h                       |   5 +
 libavformat/mov.c                        | 399 +++++++++++++-
 libavformat/movenc.c                     | 349 +++++++++++-
 libavformat/movenc.h                     |   6 +-
 libavformat/movmeta.h                    |  46 ++
 libavformat/movtref.c                    | 115 ++++
 libavformat/movtref.h                    |  75 +++
 libavutil/Makefile                       |   1 +
 libavutil/channel_layout_isoiec23001_8.h |  97 ++++
 23 files changed, 2454 insertions(+), 45 deletions(-)
 create mode 100644 doc/examples/extract_timed_metadata.c
 create mode 100644 doc/examples/muxing_with_metadata.c
 create mode 100644 libavcodec/metadec.c
 create mode 100644 libavcodec/metaenc.c
 create mode 100644 libavformat/movmeta.h
 create mode 100644 libavformat/movtref.c
 create mode 100644 libavformat/movtref.h
 create mode 100644 libavutil/channel_layout_isoiec23001_8.h


More information about the ffmpeg-devel mailing list