Skip to main content
added 2 characters in body
Source Link

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 lineprompt. 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"

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 line. 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"

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"
added 295 characters in body
Source Link

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 line. 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"

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:

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.

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 line. 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"
added 85 characters in body
Source Link

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, everyeach flac file in the current folder and output, in the same folder, an mp3 file with the same name before the extension:

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.

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 take as its input, in turn, every flac file in the current folder and output an mp3 file with the same name before the extension:

for %A in (*.flac) do ffmpeg  -i "%~nA.flac"  -c:v copy  -b:a 320k  "%~nA.mp3"

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:

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.

Source Link
Loading