[FFmpeg-user] Converting to mp3 in batch

Dotan Cohen dotancohen at gmail.com
Tue Jun 14 20:43:05 CEST 2011


On Tue, Jun 14, 2011 at 21:12, James Darnley <james.darnley at gmail.com> wrote:
> Quote the filename.

Thanks. I was quoting in the wrong places, now I see how to do it.

> Use the appropriate expansion feature for your shell.  Bash: ${file/%.*/.mp3}
>

Thank you! To have ffmpeg recognize the .mp3 extension I replaced the
old extension with nothing. The resulting command is as follows:
$ for file in *; do `ffmpeg -i "$file" "mp3/${file/%.*/}.mp3"`;done

It works great for the mp4 and amr files, but the wavs sound terrible.
These are voice recordings from various cellphones. I'll google for
some better settings.

Thank you!

-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com


More information about the ffmpeg-user mailing list