Converting M4A to MP3.




Introduction: Converting M4A to MP3.

About: I'm a geek and a biker. My short attention span pushes me to try new crafts on an almost weekly basis.

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:
MP3 encoder. (
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.

Be the First to Share


    • Puzzles Speed Challenge

      Puzzles Speed Challenge
    • "Can't Touch This" Family Contest

      "Can't Touch This" Family Contest
    • CNC Contest 2020

      CNC Contest 2020

    5 Discussions


    5 years ago

    Hello, I tried this with mp4 files but it returns '0 arguments'. Is this method only for m4a files?


    5 years ago

    Yep. Sounds easy enough. Thanks for the info. Some awesome applications out door.


    5 years ago on Introduction

    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 M4V Video Converter. This program is great and can convert without quality loss.

    Step 1. Import M4V Video Files

    Step 2. Select Needed Output Format

    Step 3. Specify Output Folder

    Step 4. Start Converting

    Now I learn this free way. I will use this.