Load Player
Overview
A script that can be used from command-line or GUI (with zenity) to prepare a collection of mp3, ogg, or m3u files for transfer to a standard "usb mass storage" mp3 player that will only handle mp3 files.
Background
For Christmas (2007) my daughter got a Sansa Shaker MP3 player. It is a really great player for kids, but unfortunitly for us, it only plays .WMA and .MP3 files. All of our cds are ripped into OGG format. So I had to create a way to convert OGGs into MP3s, then copy the new MP3s over to the device. The trick was it had to be easy enough for a 4th grader to do it without bugging me everytime she wanted to reload the player.
Here are the design issues that I had laid down before I started:
- Must handle all "music" files as input. In my cause it was MP3, OGG, and M3U (my daughter does not know, or care the difference between a song and a song list)
- Must copy/move (or at least give an option) the converted files over to the player
- Organization with track order was important since she has a number of "musicals" CDs. Organization by artist/album would be nice, but not required.
- Option to "clean-up" after itself so as not to unknowningly fill up disk space.
Version History
Version 1.0 - First released version
Prerequisites
- You need the ogg2mp3 script found here. My copy of the same file can be found here.
- You will need to have zenity installed if you wish to use the GUI interface. Not needed if you are going to only use the command line.
- Need to have ogginfo and id3tool installed on your system
Installation
- Download and install the ogg2mp3 script. Verify that the ogg2mp3 script works first.
- Download the load_player script, and save it into your path
somewhere
/usr/local/binor~/bin/ - Define the varables. You can define the varables
either at the beginning of the
load_player.shor in the users home directory in a~/.load_playerfile. Anything recorded in the~/.load_playerfile will override those set in theload_player.shscript.- HOLDINGDIR - A temporary location to do the coversions, and hold the MP3 files until they are ready to be moved to the player
- PLAYERDIR - Since the player is a standard USB mass storage devices, need to store it's mount point.
- OGGINFO - location of
ogginfo - MP3INFO - location of
id3tool - OGG2MP3 - location of the
ogg2mp3script
An example ~/.load_player config file:
HOLDINGDIR=/tmp/$USERNAME-load_player PLAYERDIR=/media/mp3player
Usage
Due to the design, you can adjust your usage as desired. In
the simpliest form, you need to simply pass at least 1 file as an option
to the load_player.sh script. The file (or files) that
you past should be "music" files. At the current time, that would be
OGG, M3U, or MP3 files. The script will then
determine if you are using an X interface or not, and all interaction
will be based on the decision.
NAUTALUS USERS:
ROX-FILER USERS:
OTHER:
Support
Assuming the problem is with my script, and not the
ogg2mp3 script, you can email
me at gentgeen
AT linuxmail DOT org. Make sure you fix the address before you
hit "send".
Credits
Kudos goes to my local LUG, WPLUG for all the scripting help via email and IRC (and really not just for this script, but all the help they have given me)
License
This really is just a script that pulls together a bunch of other stuff, so not like there is a major need for a license ;-) But for the sake of completeness I declair that this script is licensed under the GNU General Public License V2. Each of the individual components (id3tool, ogginfo, ogg2mp3.sh, etc) all hold there own license.







