[FFmpeg-user] using flac parameters in ffmpeg

James Darnley james.darnley at gmail.com
Tue Apr 3 10:11:08 CEST 2012


On 2012-04-02 20:33, Dave Rice wrote:
> 
> On Apr 2, 2012, at 6:37 AM, James Darnley wrote:
>> This sounds like a problem of reading metadata from the input wave file.
>> The flac writer of libavformat will write all the metadata tags that
>> are given to it into the VorbisComment block.
>>
>> I will add that flac.exe doesn't even understand that wave file you
>> linked to.  The error is:
>>> usesEntireiXMLSpec.WAV: ERROR reading foreign metadata: invalid WAVE file: unexpected EOF (010)
> 
> Argh. I chose a bad WAV sample as the authors of the iXML spec made an invalid WAVE file as their sample file.
> At any rate, flac's --keep-foreign-metadata doesn't have anything to do with the iXML chunk specifically. As Boštjan notes the goal of using --keep-foreign-metadata for encoding and decoding flac is that the original WAV or AIFF file could be recreated as a byte-exact output of a compressed flac file. If the source WAV file contains XMP, aXML, iXML, LIST-INFO, FLLR, JUNK, cart, fact, DISP, SyLP, IDAV, SNDM, SMED, or dozens of other non-standardized or rare WAV chunks then with --keep-foreign-metadata it will at least be stored in the flac file.
> Dave

I was intending to use the sample you provided to see how flac stores
the foreign metadata.  Instead I searched through their source code.

For reference, flac stores these extra sections in Application data
blocks. See the flac source: src/flac/foreign_metadata.c:419

It should be simple to write these blocks if the contents or at least
the size are known at the start of encoding.  It would be more difficult
if you have to rewrite the entire file.


More information about the ffmpeg-user mailing list