13

Converting your m4a music files to mp3

Have you found yourself in posession of music or audio files that were in m4a format and wanted them as mp3′s?Well good thing it quite easy to convert them.Here is a quick script I have made to do just that:#!/bin/sh# converting multiple m4a files to mp3 and removing the created wav’s. for i in *.m4a; do faad “$i”; donefor i in *.wav; do lame “$i” “$i.mp3″ && rm “$i”; donerename .wav.mp3 .mp3 *.mp3I like doing it in a few different steps, so I can check the .wav’s for quality, compression and corruption before converting them to mp3′s, that is why the processes are split up. Here is what each line is doing: for i in *.m4a; do faad “$i”; doneIs taking each m4a file, running faad on it, which is outputting it to a wav file (the file name will actually be .m4a.wav) which is fine since we’ll be doing another round of conversions anyway. auction direct . This one is keeping the original m4a files ( I do that just in case the conversion to mp3′s have lots of quality loss, or corruption). If you want to remove them while it converts them you can use this line instead: for i in *.m4a; do faad “$i” && rm “$i”; doneOn to the next command: for i in *.wav; do lame “$i” “$i.mp3″ && rm “$i”; doneNow we are grabbing each .wav file converting them from .wav to .mp3 using lame and removing the original .wav files (I don’t care about these, since I can easily recreate again using the first command). dental implants . alabama dental association . You will notice these are named with .wav.mp3 (this was just the simplest way to keep the script clean for people to understand), so we can fix that easily with the rename command. Lastly we just want to clean up the naming of these files, so we run: rename .wav.mp3 .mp3 *.mp3Which is renaming all mp3′s that have the portion .wav.mp3 to only .mp3. I hope at least one person finds this helpful. for the people running Ubuntu or a Debian based system that ships with the perl version of rename, you’ll have to use the following line to rename the .wav.mp3 to .mp3:rename ‘s/.wav.mp3/.mp3/’ *.mp3Just had an email about that.. hope it helps. digg_url = ‘http://digg.com/linux_unix/Converting_m4a_to_mp3_with_Linux’;


1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

About the Author

I am ben kevan.. Well yeah. .that's about it.

Comments (13)

Trackback URL | Comments RSS Feed

  1. Alexandra says:

    That person being me? ;-)
    This es really helpful stuff, thanks!

  2. DJ says:

    Well thats 2 persons! So you just doubled the outcome of your expectation. Not bad :)

    Thanks!
    DJ

  3. Anzhr says:

    Thanks.

  4. [...] good thing it quite easy to convert them.Here is a quick script I have made to do just that:http://www.benkevan.com/blog/converting-your-m4a-music-files-to-mp3/free convert m4a to mp3Convert m4a to mp3 software . convert audio cd to mp3 . Burn mp3 to CD. To [...]

  5. Emma says:

    May be helpful. But people like me will feel complicated. Why not use a software to convert m4a to mp3. It’s more simple.

  6. ben.kevan says:

    faad and lame are pieces of software that I am utilizing to do the conversion.

    The script is only used to do a full directory and changing the names etc.

    Pretty simple IMO, and it ships with most linux distributions.

  7. Dai says:

    is there a forum on the site?

  8. ben.kevan says:

    Dai,

    Currently no.. But I’m working on that portion right now (phpbb).. I just have to re-skin it.

    Thanks.

    Also, is that your site? Please contact me if it is.

  9. Not that I’m impressed a lot, but this is more than I expected for when I found a link on Digg telling that the info here is awesome. Thanks.

  10. TheOneIsAmongUs says:

    How do I run this?

  11. ben.kevan says:

    @TheOneIsAmongUs

    You can either make a shell script with the commands above, or copy them into your terminal. Linux is a requirement here though. Not sure what type of machine you are on.

    Thanks

  12. Unlike a loan, it can still cost the person leasing the van quite a bit even if they want to settle the lease early. Unlike a vehicle loan, settling early with a van lease usually means that the individual still needs to pay the interest on the remaining months.

  13. Although this is an old post it just fit what I needed to do.
    It worked very well, deserve my thanks!
    I liked the explanation you gave on the code..
    Keep up the good content, Regards.

Leave a Reply




If you want a picture to show with your comment, go get a Gravatar.