Let's say you have a load of purchased m4a files which you would like to transfer to a flash drive and in turn plug into a TV or other media center. Unfortunately the media center only takes MP3s. What to do?

Convert them in a few easy steps. (FREE)

Step 1: Requirements

You will need the following to do this:
FFMPEG (http://www.ffmpeg.org/)
MP3 encoder. (http://lame.sourceforge.net/)
And notepad.

A few notes:
I'm doing this in Windows. The *nix version should be very similar and actually a bit easier in one of the steps.

Install all of the above where you see fit. Then run the following command in a command prompt to check that ffmpeg recognizes the mp3 encoder.

ffmpeg -codecs help

ffmpeg -codecs help | grep 'mp3'

Check for libmp3lame as in the attached image. If it is there, then you are good to go.

Step 2: The Batch Script

Using notepad, create a file called :

I'll discuss two methods and you can choose which one to use. Add the script content of the option you would like to use.

Convert single file to mp3:
This option will take one file as an argument and convert it to an mp3 and save it as the original file name appended with a '.mp3'
Script content:
echo off
set filename=%1 C:\Path_to_ffmpeg\ffmpeg.exe -i %filename% -acodec libmp3lame -ab 128k %filename%.mp3 PAUSE

Convert a batch of arguments (not checked for type) to mp3.
Loops through the batch file arguments and tries to convert them all.

@echo off
setlocal enabledelayedexpansion set argCount=0 for %%x in (%*) do ( set /A argCount+=1 set "argVec[!argCount!]=%%~x" ) echo Number of processed arguments: %argCount% for /L %%i in (1,1,%argCount%) do C:\Path_to_ffmpeg\ffmpeg.exe -i "!argVec[%%i]!" -acodec libmp3lame -ab 128k "!argVec[%%i]!".mp3 PAUSE

I've created two batch files as can be seen in the attached image, one for each script, but only one is required.

Step 3: Drag and Drop

The last step:

Open two Explorer sessions. The first navigated to the directory where ffmpeg and the batch scripts are stored. The other to the M4As you wish to convert.

Select the M4A files, drag and drop them on the batch script created in the previous step. The process should start automatically and spit out MP3 files in the same directory as the M4A files.

Step 4: Some Final Notes

This process does not support directories. Only files. There is probably some snazzy way of going through all the sub directories and get the m4a files. But I've not needed it.

There are tools out there with nifty GUIs to do this. This one is free.

Lastly, FFMPEG does not grab cover art and album information. It purely converts one file format to another through encoding. If there is a way (using ffmpeg) to do so, then let me know since it will be pretty cool.
<p>I often use <a href="http://www.apple-music-converter.com" rel="nofollow">Apple Music Converter</a> to convert M4A to MP3. It can also convert Apple Music songs, M4B audiobooks and Audible AA/AAX audiobooks. The ID tags will preserved in output MP3 files. And the conversion speed is incredibly fast.</p>
<p>This article also gives a great tutorial about <a href="http://www.apowersoft.com/convert-m4a-audio-to-mp3.html" rel="nofollow">converting M4A to MP3</a>. It actually gives top 5 tools that we can use. You can try reading it. </p>
<p>I just find a tutorial which introduce two methods to convert M4A to MP3 at </p><p><a href="http://www.idealshare.net/audio-converter/convert-m4a-to-mp3-on-mac-windows.html" rel="nofollow">http://www.idealshare.net/audio-converter/convert-...</a><br><br>Method 1 use iTunes</p><p>Method 2 use a M4A to MP3 Converter</p>
Hello, I tried this with mp4 files but it returns '0 arguments'. Is this method only for m4a files?
Yep. Sounds easy enough. Thanks for the info. Some awesome applications out door.
<p>Great post. M4A is drm protected, if you want to play M4A files without iTunes, you need to remove drm protection and convert m4a to other formats. I have used a paid program named Adoreshare <a href="http://www.adoreshare.com/products/m4v-converter-genius.html" rel="nofollow">M4V Video Converter</a>. This program is great and can convert without quality loss.</p><p>Step 1. Import M4V Video Files</p><p>Step 2. Select Needed Output Format</p><p>Step 3. Specify Output Folder</p><p>Step 4. Start Converting</p><p> Now I learn this free way. I will use this. </p><p>Thanks</p>

About This Instructable




Bio: I'm a geek and a biker. My short attention span pushes me to try new crafts on an almost weekly basis.
More by TvZ:Add logging to a Java application Simple JAVA Scheduler Converting M4A to MP3. 
Add instructable to: