#384 Unable to get --keep-foreign-metadata option to work

open
nobody
None
5
2013-12-15
2011-06-02
Steph Kerman
No

When attempting to encode a file using the above option from the command line, FLAC 1.2.1 fails:

flac ATC.wav - works

flac -6 ATC.wav - works

flac --keep-foreign-metadata ATC.wav
- ATC.wav: ERROR reading foreign metadata: invalid WAVE file: unexpected EOF (010)

As I read the instructions page, this is the correct command line syntax.

Discussion

  • Erik Bachmann
    Erik Bachmann
    2013-12-15

    Seems like flac fails if no meta data is found. Try something like:

    FOR %%A IN (*.WAV) DO (
     flac.exe -V -f --keep-foreign-metadata --replay-gain -8 "%%A"
     IF ERRORLEVEL 1 flac.exe -V -f --replay-gain -8 "%%A"
     flac.exe -t "%%~dpnA.flac"
    )