How can I convert audio files to this format?

1

0

I have a bunch of audio files that are named .wav but it seems not all .wavs are created equal. For example:

$ file *
file1.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz
file2.wav: Audio file with ID3 version 2.2.0, contains: MPEG ADTS, layer III, v1, 160 kbps, 44.1 kHz, JntStereo
file3.wav: Claris clip art?
file4.wav: Audio file with ID3 version 2.2.0, contains: MPEG ADTS, layer III, v1, 160 kbps, 44.1 kHz, JntStereo

And for good measure, a non-wav:

file5.m4a: ISO Media, MPEG v4 system, iTunes AAC-LC

I would like to convert all of these files to the format that file1.wav is:

RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz

What is the proper set of arguments to pass to afconvert to make that happen?

jeffamaphone

Posted 2012-10-31T16:13:39.343

Reputation: 389

Answers

0

Your file2.wav and file4.wav are .mp3 files

maybe you should separate them by type first and then try the conversion from the different types to real .wav (PCM uncompressed)

i believe you cand find a tutorial here: http://blog.bitcomet.com/post/103259/

If you really MUST use afconvert, make sure that your files have the proper extensions for their format.

Calin

Posted 2012-10-31T16:13:39.343

Reputation: 41

Well, I have a lot and more will come so it needs to be automatable. I was using afconvert because its a command line tool and its there. If there is a better tool I'd happily use it. But GUI tools (I looked at another one that was on the Vorbis wiki—I forget the name) are not going to work. – jeffamaphone – 2012-10-31T16:54:38.233