Geeks With Blogs
Justin Oehlmann Looking for Love in all the Wrong Places :-)
So I was tasked with looking at converting 10 million tracks from mp3 320k to AAC and also
Converting from mp3 320k to mp3 128k

After a bit of hunting around the tool you need to use is

FFMPEG Download x64 Windows

Also for the best results get the Nero AACEncoder Download

Now the command line

(From Flac)
ffmpeg -i input.flac -f wav - | neroAacEnc -ignorelength -q 0.5 -if - -of output.m4a

(From mp3)
ffmpeg -i input.mp3 -f wav - | neroAacEnc -ignorelength -q 0.5 -if - -of output.m4a

Now the output.m4a is a intermediate state that we now put a ACC wrapper on via FFMpeg


ffmpeg -i output.m4a -vn -acodec copy final.aac

Done :)

There are a couple of options with the FFMPEG library as in we can look at importing the librarys and manipulation the API for the direct result FFMPEG has this support. You can get the relevant librarys from Here

They even have the source if you are that keen :-)

In this case I am going to wrap the command lines into c# external process threads.
( For the app that i am building to convert the 10 million tracks there is a complex multithreaded app to support this novel code )

//Arrange Metadata about Call
Process myProcess = new Process();
ProcessStartInfo p = new ProcessStartInfo();
string sArgs = string.format(" -i {0} -f wav - | neroAacEnc -ignorelength -q 0.5 -if - -of {1}",inputfile,outputfil) ; p.FileName = "ffmpeg.exe" ; p.CreateNoWindow = true; p.RedirectStandardOutput = true; //p.WindowStyle = ProcessWindowStyle.Normal p.UseShellExecute = false;
p.Arguments = sArgs;
myProcess.StartInfo = p;
//Write details about call
Now in this case we would execute a 2nd call using the same code but with different sArgs to put the AAC wrapper on the m4a file.

Thats it. So if you need to do some conversions of any kind for you sites/apps this is a great start and super fast.. With conversion times of around 2-3 seconds all of this can be done on the fly

Justin Oehlmann

ref :

UPDATE - Just found a great site that has all of the encoders/decoders in both exe & dll form...:-)

Posted on Wednesday, November 23, 2011 10:19 AM | Back to top

Comments on this post: Convert MP3 to AAC,FLAC to AAC (.NET/C#) FREE :)

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Justin Oehlmann | Powered by: | Join free