I have a Creative nomad MP3 player. It's a very cute device: plugs into USB, shows a USB mass storage file system, I mount it as a VFAT file system, write .mp3 files onto it.
The trouble is that I mostly have .ogg music files. And, the device has only 64 Meg, so one wants low res .mp3 files to be generated and put on the player.
loadmp3 is a program which accepts commandline args, and writes .mp3 files into a USB Mass Storage MP3 player. It allows you to have an ogg database while using an mp3 player.
Features:
$ loadmp3.pl [-check] filenames
If the -check flag is enabled, the ONLY thing it does it to test whether your specified filelist fits into your MP3 device. It does no mount/umount activities.
What is going on here is:
So if you say
$ sudo loadmp3.pl afewfiles
it will first place your few files, and then fill up the remaining space with randomised selection. If, on the other hand, you just say
$ sudo loadmp3.pl
then it will only do randomised selection and placement.
Watch me run it. I tell him to place the album 'Dark Side of the Moon'. Beyond that, he does his own thing.
$ sudo ~ajayshah/BIN/loadmp3.pl /home/music/Pink_Floyd/Dark_Side_Of_The_Moon/* Okay, your files add up to 26361852, and I will allocate 37126148. Mounting MP3 device... Processing /home/music/Pink_Floyd/Dark_Side_Of_The_Moon/01_Speak_To_Me.ogg... Processing /home/music/Pink_Floyd/Dark_Side_Of_The_Moon/02_Breathe.ogg... Processing /home/music/Pink_Floyd/Dark_Side_Of_The_Moon/03_On_The_Run.ogg... Processing /home/music/Pink_Floyd/Dark_Side_Of_The_Moon/04_Time.ogg... Processing /home/music/Pink_Floyd/Dark_Side_Of_The_Moon/05_The_Great_Gig_In_The_Sky.ogg... Processing /home/music/Pink_Floyd/Dark_Side_Of_The_Moon/07_Us_And_Them.ogg... Processing /home/music/Pink_Floyd/Dark_Side_Of_The_Moon/08_Any_Colour_You_Like.ogg... Processing /home/music/Pink_Floyd/Dark_Side_Of_The_Moon/09_Brain_Damage.ogg... Processing /home/music/Pink_Floyd/Dark_Side_Of_The_Moon/10_Eclipse.ogg... Processing /home/music/Led_Zeppelin/08_The_Song_Remains_The_Same.ogg... Processing /home/music/U2/War/07_Two_Hearts_Beat_As_One.ogg... Processing /home/music/Roger_Waters/In_The_Flesh_Disc_2/10_Eclipse.ogg... Processing /home/music/Joni_Mitchell/Both_Sides_Now/05_Answer_Me,_My_Love.ogg... Processing /home/music/Pink_Floyd/Dark_Side_Of_The_Moon/07_Us_And_Them.ogg... Processing /home/music/Don_Henley/01_The_End_Of_The_Innocence.mp3... Processing /home/music/Asia/06_Wildest_Dreams.mp3... Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda1 61904 61792 112 100% /mnt/ums Umounting...
Back up to Ajay Shah's home page -- Free software
Ajay Shah
ajayshah at mayin dot org