[FFmpeg-user] using flac parameters in ffmpeg

Dave Rice daverice at mac.com
Mon Apr 2 20:33:24 CEST 2012


On Apr 2, 2012, at 6:37 AM, James Darnley wrote:

> On 2012-04-02 04:44, David Rice wrote:
>> Hi Carl,
>> 
>> On Mar 31, 2012, at 12:51 PM, Carl Eugen Hoyos wrote:
>> 
>>> David Rice <daverice <at> mac.com> writes:
>>> 
>>>> Is it possible to use flac's --keep-foreign-metadata 
>>>> feature in ffmpeg when decoding or encoding flac files?
>>> 
>>> (Command line and complete, uncut console output missing.)
>> 
>> I placed this at https://ffmpeg.org/trac/ffmpeg/ticket/1158.
>> 
>>> Isn't this the default?
>> 
>> I see some of the bext tags are mapped to flac tags which is great, but is not entirely what --keep-foreign-metadata does in the flac utility. For instance, this sample http://www.gallery.co.uk/ixml/examples/usesEntireiXMLSpec.WAV has an iXML chunk. With "flac --keep-foreign-metadata usesEntireiXMLSpec.WAV" the output would contain a copy of the iXML chunk.
>> Dave
> 
> 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


More information about the ffmpeg-user mailing list