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...
- How to boot multiple CDs from a USB stick I routinely need to use several live CDs or installation...
- DDNS with PowerDNS – client side I use PowerDNS for my own DNS servers, but what...
- DDNS with PowerDNS – server side This is the second part in the “DDNS with PowerDNS”...



Home




