Converting FLAC To MP3 Using FFMPEG?
Answer :
You say you are using Windows command shell, but the first command line you showed (the one that starts "for file in") doesn't look like Windows, more like some kind of Linux shell command. The second one won't work because ffmpeg won't accept a wildcard as an input file spec.
This one line Windows command does what you seem to want, to make ffmpeg (using your options above) take as its input, in turn, each flac file in the current folder and output, in the same folder, an mp3 file with the same name before the extension:
At prompt:
for %A in (*.flac) do ffmpeg -i "%~nA.flac" -c:v copy -b:a 320k "%~nA.mp3"
If the mp3 file already exists, ffmpeg will ask if you want to overwrite it.
Note: the above command is crafted for the command prompt. It won't work in a batch script. For that, you need to double all the percent signs (%) like this
In batch (cmd) script:
for %%A in (*.flac) do ffmpeg -i "%%~nA.flac" -c:v copy -b:a 320k "%%~nA.mp3"
Comments
Post a Comment