How can I convert audio files to this format?

Posted by jeffamaphone on Super User See other posts from Super User or by jeffamaphone
Published on 2012-10-31T16:13:39Z Indexed on 2012/10/31 17:03 UTC
Read the original article Hit count: 342

Filed under:
|
|

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?

© Super User or respective owner

Related posts about osx

Related posts about wav