Your MP3-Player has got 60 Mb left, but you can’t decide which songs to put on it?
You want to listen across your fresh new music titles, but you don’t have the time or space to copy them all to your player?
If so, RndMp3Copy will help you.
Originally, this tool was suppaman2’s idea (see Gulli-board post (German)), but I (and several others) had a problem with it: It was dead slow.
That was probably the case because his version was scripted in AutoIt3, which is really neat for hacking things like this together, but unfortunately is rather slow. So it wasn’t really practicable to let this tool handle your complete music library.
I recoded the application in C++ using the boost::filesystem library and now it’s running like a greased lightning! :)
This is a project I coded in 2009. I won’t touch the code again and I am not using it anymore, but if it helps someone I’m glad :)
Range of functions / Usage
If you are happy using the GUI, you don’t need to read this, because the GUI will do this for you.
RndMp3Copy is completely driven by parameters and doesn’t need any runtime-interaction, thus it can be easily executed as a batch script or cronjob.
-ispecifies the input music directory. You can specify more than one input directory, but you have to set an individual
-osets the output directory (or device, if it can be accessed with a regular path (meaning, you can only use MTP devices if you mount them as a normal drive).
-ssets the desired amount of music in megabytes, so
-s 46.7means 46 megabytes and 700 kilobytes. You can also fill the complete device (if you have enough music to fill it up, of course) by passing
allinstead of a number.
-dspecifies the naming convention for output files:
0: output/file.ext (default)
-lsets a so-called used-list, which means that songs mentioned in this file will be skipped. If this option is set, RndMp3Copy will create entries for every song that was copied during this process. This function is useful for example when you fill your player on a daily basis and don’t want to hear songs that you had on your player the day before.
-fsets the file formats that will be scanned for. If no file format is given, RndMp3Copy will only look for .mp3 files. With this option, you could even use RndMp3Copy to copy random e-books, videos or whatever.
You can use regular expressions to filter the data.
-inspecifies a pattern that must be matched
-exspecifies a pattern that must not be matched.
-mswitch sets that files won’t be copied, but moved instead.
-wwill order RndMp3Copy not to end immediately after finishing, but rather wait for the user to press any key. This should only be useful for debugging / analysis purposes.
-vwill enable debug output (must not be last option). If you encounter crashes or really odd behaviour, please enable this option, pipe RndMp3Copy’s output to a file and sed this to me with a brief description of what happened.
An example call:
RndMp3Copy -i ~/music/ -i /media/cdrom/music/soundtrack/ -o /media/mp3player/ -s 128 -f mp3,wma,ogg,flac -ex “(Tokio.?Hotel)” -w
This will copy about 128 mb mp3-, wma-, ogg- and flac-songs, that don’t contain the words “Tokio” and “Hotel” from two different sources to a mobile player and then waits for the user to press return.
I deliver separate GUIs for a practical reason:
The AutoIt3-GUI used for Windows won’t work on other OSs (I think they will work using wine, though) and the GTK+ gui theoretically works on Windows, but you need to download about 100mb runtime files to get it to work.
Both GUIs only serve the purpose of generating a call with the before mentioned parameters, running the tool and showing you the text output.
The Linux-GUI bases on Glade and GTKmm / GTK+. If you have a Gnome-Desktop, you should already have these installed.
The AutoIt3-GUI should run out-of-the-box on most Windows versions. It’s supplied in the Windows package.
However, if you really want to use the GTK-GUI on Windows, you can download the sources and compile it on Windows.