How to automatically split/separate tracks?

I have a large number of inherited files. They are all MP3 one hour lecture files and were recorded with a different lesson on each track (one on the left and a different one on the right). I have about 5K files. I would like to split the file and save it as two seperate monaural files. For example the left channel on file one and the right channel on file two. I would also like to automate the file name ie if the original file was named George the new working files names would be something like GeorgeL and GeorgeR once they are split. The structure is the same on all of the files. Is there any way to automate or script this process? I dread the though of having to split 5000 files manually. Any time saving suggestions would be appreciated.

Yes, it’s doable.
Download sox 14.4.0 for Windows. http://sourceforge.net/projects/sox/files/sox/
Install it. It will install into C:Program Filessox-14-4-0 on a 32-bit Windows or into C:Program Files (x86)sox-14-4-0 on a 64-bit.

Go to https://docs.google.com/file/d/0BxRalAlWlsgjclFzOTVKLTBGUnM/edit?pli=1 and fetch libmad.dll and libmp3lame.dll
Copy both dll files to the directory where sox installed.

Create a CMD script like this:

setlocal
REM Add SOX program directory to PATH
set PROGRAM_FILES=%ProgramFiles%
REM Are we running on a 64-bit OS? If so, adjust PATH accordingly
if %PROCESSOR_ARCHITECTURE%==AMD64 set PROGRAM_FILES=%ProgramFiles% ^(x86^)
PATH="%PROGRAM_FILES%sox-14-4-0";%PATH%

REM Loop through all MP3 files and split them into left and right channel mono files.
for %%G in (*.mp3) do (
	sox "%%G" "%%~nG.L.mp3" remix 1
	sox "%%G" "%%~nG.R.mp3" remix 2
)

Now open a command prompt, navigate to a directory of mp3 files and run the script.
George.mp3 will be split into George.L.mp3 and George.R.mp3

It is quite possible that the script will choke if you have thousands of files in the directory, I have never tested it with more than a few hundred.


Ragnar

Came to think about quality. You might want to play with the -C option to set the bit rate of the output files.
By default you will get 64 kbps mp3 files. A command line like this will produce 128 kbps:

sox "%%G" -C 128 "%%~nG.L.mp3" remix 1

See here for all the details: http://old.nabble.com/MP3-Compression-Value-td30804543.html


Ragnar