[FFmpeg-devel] [RFC] WAV muxer: add RF64 support

Daniel Verkamp daniel at drv.nu
Wed Jan 23 09:59:08 CET 2013


Here's a simple modification to the WAV muxer that allows writing RF64
headers as needed when the file grows large enough (by reserving space
with a JUNK chunk).

I am sending this as RFC for a couple reasons:

- The option names and format need to be decided; I currently have
  -allow_rf64 (reserve space but do not write RF64 until the file is
  >4GB) and -force_rf64 (always write RF64 headers regardless of file
  size), but these could perhaps be named better or rolled into a
  -wavflags or something similar.  I don't know if there is some
  overarching scheme for naming and structuring muxer options.

- The new rf64 options in the current patch are disabled by default,
  so the current behavior when muxing a >4GB file is unchanged.
  Ideally, we should do the right thing by default, but it's a
  compromise between writing correct large files and writing
  minimal/compatible small files (e.g. any WAV readers that assume the
  PCM data starts at a fixed offset will be broken by the insertion of
  the JUNK chunk; I don't know of any programs like this offhand, but I
  don't doubt they exist).  The best option is probably to enable
  -allow_rf64 by default and allow the user to disable it if necessary
  to accomodate broken demuxers.

Any normal code review feedback is welcome as well.

This still needs the normal updates to version number and Changelog once
everything has been decided, plus test reference updates if it's enabled
by default.

-- Daniel Verkamp

More information about the ffmpeg-devel mailing list