function reencode_mp3
%%This is my solution to archiving, reencoding, and creating playlists for
%%an entire MP3 collection, regardless of the size of the archive
%%Routine assumes a 'Z:\mp3_archive/incoming\' and 'Z:\mp3_96kbps\' folder
%%and that the great audio encoding utility 'lame.exe' is globally pathed
%%Takes all tracks in 'Z:\mp3_archive/incoming\' and reencodes them at
%%96Kbps, transfers them to 'Z:\mp3_archive/incoming\', using the archived
%%folder naming convention, and creates a usable playlist for use on a
%%portable MP3 player or Winamp (or similar universal player).
%%Please note:
%%Routine also requires modified subroutines 'rename_mp3' and
%%'create_playlist2'
%%Please forward any feedback or code requests to brad1102 @
%%www.afterdawn.com or this thread
cd Z:\mp3_archive\Incoming
static1=('Z:\mp3_96kbps\');
aaa=dir('*.*');
for i=4:length(aaa);
cd (aaa(i).name)
%%List mp3 files in folder and recode them
fold=(aaa(i).name);
dfold=sprintf('%s%s\\',static1,fold);
bbb=dir('*.mp3');
for j=1:length(bbb);
eval(sprintf('!lame -b 96 "%s" "%s_R"',bbb(j).name,bbb(j).name));
end
eval(sprintf('!mkdir "%s"',dfold));
eval(sprintf('!xcopy /y *.mp3_R "%s"',dfold));
eval(sprintf('!del /q *.mp3_R'));
cd (dfold);
%%All of the reencoded (96kbps) files have been transfered to
%%'Z:\mp3_96kbps\' with a preceding _R and need to be renamed
rename_mp3
%%As an added touch, lets create a RIO CALI compatible playlist for the
%%Album, shall we?
create_playlist2
%%Copy the newly created playlist to the root of 'Z:\mp3_96kbps\'
eval(sprintf('!xcopy /y *.m3u "%s"',static1));
%%Delete the one in the album folder
eval(sprintf('!del /q *.m3u'));
%%Get back to the root of the main archive for processing of the next
%%Album
cd Z:\mp3_archive\Incoming
end
Canadian Based Installer
Premods Ready to go!!!
DMS4Lite/Pro v7-10 300/310 CAD or 240/250 USD
DMS4Lite/Pro v12 325/335 CAD or 260/270 USD
-email me anshelmb@telus.net

|