[FFmpeg-devel] [PATCH 0/2] libavformat/mxfenc: add support for muxing mxf opatom audio

Mark Reid mindmark at gmail.com
Sun Mar 22 00:45:26 CET 2015

This patch series adds support for muxing mxf opatom audio files.
The media generate is compatible with avid media composer, in my tests.
The patches only adds support single channel 48kHz pcm_16/24le.
Media composer also supports 32kHz and 44.1kHz, which I plan to add in a
future patch. I’m still sorting out how multi channel works, media composer seems
to always split the each channel to a separate file.

I split it into 2 patches to make sure I didn’t break the other mxf formats.
The first patch added the necessary tags to the primer pack, which require the 
tests to be updated. I also noticed the package_name tag was missing so I also took the
opportunity to add it as well.

example usage:
ffmpeg -f lavfi -i "sine=frequency=1000:sample_rate=48000:duration=5" -f mxf_opatom out.mxf

example with 23.97 timecode
ffmpeg -f lavfi -i "sine=frequency=1000:sample_rate=48000:duration=5" -timecode "01:23:45:12" -mxf_audio_tcr 23.97 -f mxf_opatom out.mxf

OPAtom can only contain a single stream of data. To get timecode to work mxf needs a video rate.
Since there is no video stream to choose timecode rate from, a way is needed to determine what
the timecode rate is. to get this to work I added a -mxf_audio_tcr option. If not supplied
ffmpeg defaults to a timecode rate of 25fps.

Mark Reid (2):
  libavformat/mxfenc: add container duration and package name to primer
  libavformat/mxfenc: add support for muxing mxf opatom audio

 libavformat/mxfenc.c           | 102 ++++++++++++++++++++++++++++++++++-------
 tests/ref/lavf/mxf             |   6 +--
 tests/ref/lavf/mxf_d10         |   2 +-
 tests/ref/lavf/mxf_opatom      |   4 +-
 tests/ref/seek/lavf-mxf_opatom |  54 +++++++++++-----------
 5 files changed, 118 insertions(+), 50 deletions(-)


More information about the ffmpeg-devel mailing list