I stumbled across some m4a files a few days ago and I really wanted them in mp3 format. The conversion itself was not that complicated, since I based my script on the previous Convert flac to mp3 post and script. The tricky pars was figuring out what decoder I needed to use on Linux.
To make the search even more confusing, there are actually two file extensions for the same thing: m4a and mp4. Read more about the war between them here. I finally figured out I needed the package faad. Why not mp4dec or m4adec or even mp4 or m4a? We will never know.
Anyway, the following one-liner requires faad and lame installed. It keeps the filename and changes only the extension. It doesn’t keep any ID3 tags (btw, are they called id4 tags in case of mp4 files and i4d files in case of m4a !?).
Just run these in the directory where you keep the files:
- for mp4 files:
- for m4a files:
for F in *.mp4; do faad -o - "$F" | lame -h --vbr-new -V 0 - "`basename "$F" mp4`"mp3; done
for F in *.m4a; do faad -o - "$F" | lame -h --vbr-new -V 0 - "`basename "$F" m4a`"mp3; done
You will get a mp3 file for each of the mp4/m4a files.
Enjoy
Image credit: Andrew Mason.
Related posts:
- Convert flac to mp3 The post is in English because it might interest other...
- Convert Xmail to Dovecot users This post is in English because it might interest other...
- Xmail password decrypter This post is in English because it might interest other...



Home





January 22nd, 2010 at 18:00
[...] This post was mentioned on Twitter by Ovidiu Constantin, Ovidiu Constantin. Ovidiu Constantin said: Post nou pe blog: Convert m4a/mp4 to mp3 http://bit.ly/6VomGM [...]
January 23rd, 2010 at 18:08
Social comments and analytics for this post…
This post was mentioned on Twitter by ovidiusoft: Post nou pe blog: Convert m4a/mp4 to mp3 http://bit.ly/6VomGM...