4

Discussion in Freesound.org, here, is stagnated. You could do this with Audacity but their developer warned about that (apparently stupid idea to load the GUIs or something like that). Is there something like ImageMagick for sounds? I have a repository full of small music pieces (UX sounds etc) that I need to one consistent format, how can I do that?

  • I would search the web for a sound converter for your system. Whether you're on Linux, Windows or OS X, you'll probably going to find something. – Zettt May 14 '12 at 13:39
6

The following example will make a directory called outputdir and then re-encode all wav inputs in the current directory to mp3:

mkdir outputdir
for f in *.wav; do ffmpeg -i "$f" -c:a libmp3lame -q:a 4 outputdir/"${f%.wav}.mp3"; done

You can use a slightly modified command to convert multiple formats to MP3:

mkdir outputdir
for f in *.{wav,aiff,flac,m4a}; do ffmpeg -i "$f" \
-c:a libmp3lame -q:a 4 outputdir/"${f%.*}.mp3"

Use whatever file extensions you want in there, but remember that converting one from one lossy codec to another is a bad idea (so converting ogg vorbis to mp3 wouldn't work well).

1

If you're on Windows, ffmpeg + Avanti will do the trick. Just perform the conversion on a single audio file, then queue all the rest in the job manager and go.

  • ...well not using W but *ix systems but perhaps useful for others. – hhh May 14 '12 at 17:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.