Category Archives: MP3

Sorting mp3 files based on Album ID3 Tags in Powershell

I had a large number of mp3 files that were all in a single folder, however the album ID3 tag were all correct.  I used powershell and taglib-sharp.dll to read the album ID3 tag, create a folder and move the mp3 into that folder.
Taglib-sharp.dll can be found here (new window).
The powershell code at pastebin here (new window).
You will need to edit the variables:
#folderToSearch is the folder that has the files
#taglibLocation is the location of the taglib-sharp.dll
#fileExtension is the file extension of the files with the ID3 tags (eg: mp3, wma, etc)

It can also be used with WMA files, and possibly any files that contain album ID3 tags, and with a little modification, any ID3 tag can be used.

Convert WMA to MP3

Download and install MPlayer from here: http://www.mplayerhq.hu

Download and install LAME from here: http://lame.sourceforge.net/index.php

The sample WMA file I used can be found here:  http://www.theflute.co.uk/htmlMain/samplemusicW.htm

Open a command prompt,

Navigate to the location you installed MPlayer to.  In this example, it is “c:program files (x86)mplayer”.

Type mplayer –vo null –vc dummy –af resample=44100 –ao pcm %WMAFILE% where %WMAFILE% is the path and name to the WMA file.

eg: mplayer –vo null –vc dummy –af resample=44100 –ao pcm “c:wmaBachCPE_SonataAmin_1.wma”

If you use a filename with spaces, you must provide quotes around the path and filename.

Wait for the decode….

This will create a file called audiodump.wav in the same folder as MPlayer.  Move this to a convenient location if you wish, and rename it as appropriate.

The steps below are essentially the same for using LAME when converting an FLAC file to MP3. (opens in a new window)

Navigate to “c:program files (x86)lame for audacity” or the equivalent.

Type lame %WAVFILE% where %WAVFILE% is the path and name to the wave file.

eg: lame “c:program files (x86)mplayeraudiodump.wav”

Wait for the encode…

Once it has completed, close the command prompt window.

The MP3 file is located in the same location as the WAV file.  In the example above, it is in the “c:program files (x86)mplayer folder.

To batch convert a folder of WMA files to MP3, you can use the following batch file: 
http://pastebin.com/axLnmRnG

Convert FLAC to MP3

Download and install FLAC from here:  http://sourceforge.net/projects/flac/

Download and install LAME from here:  http://lame.sourceforge.net/index.php

The sample FLAC file I used can be found here:  http://www.2l.no/hires/

Click Start, find FLAC, right click FLAC Frontend and select Run as administrator.

Click Yes on the UAC prompt.

Click Add files



Navigate to the FLAC files you wish to convert and add them

Select Decode

Once it has finished, close down FLAC Frontend.  FLAC saves the wav files in the same location as the FLAC files.

Open a command prompt,

Navigate to “c:program files (x86)lame for audacity” or the equivalent.

type lame %WAVFILE% where %WAVFILE% is the path and name to the wave file.

eg: lame c:flac2L38_01_192kHz.wav

Once it has completed, close the command prompt window.

To batch convert a folder of FLAC files to MP3, you can use the following batch file:
http://pastebin.com/rhfyx2Er