Create Playlists for Rockbox

Create Playlists for Rockbox

Rockbox is playlist-oriented but the process by which they’re made isn’t exactly straightforward.  This becomes even more compounded if you use a Linux-based operating system where there is no native application to do this.  I’ll show you how to create playlists for Rockbox installed on one of your digital music players.

Let’s presume that you’ve already visited rockbox.org, downloaded the correct firmware version for your player and have installed that firmware on your player.  Let’s presume that you did a great job with it and want to know how to use the music already present on that same player.

How I Create Playlists for Rockbox

Playlists for Rockbox are easy to make.  They are files with extension .m3u8 or .m3u that have a specific directory.  The contents are pretty easy to understand.  In each playlist file is the location/name of the audio file to be used in the playlist.  For instance, in the root directory of the Ipod, if I were to create a Music folder and place a song entitle song.ogg in that directory, the entry in the playlist would simply be

Music/song.ogg

How nice!  (By the way, I used that example to discuss the fact that Rockbox bends my Ipod to my will in that it now plays Ogg Vorbis files!)

I had to learn some basic Bash Shell scripting, but I created a super simple script to take all the files in a directory and make a playlist for those files.  Then, it moves that playlist file to the Playlist Directory.
#!/bin/bash
#$1-directory name
#$2-location to send playlsit
#$3-playlist name (.m3u)

rm $2/$3.m3u
shopt -s nullglob
cd $1


for i in *.mp3
do
echo "$1$i" >> $3.m3u
done


for i in *.ogg
do
echo "$1$i" >> $3.m3u
done


mv $3.m3u ../
cd ..
mv $3.m3u $2;

It’s simple and I’m sure that many people out there are like “Whoa….this is awful.” But it suffices. There is no error checking…at all.  However, it works simply

./playlistmk DirectoryContainingFiles LocationofPlaylist playlist_name

Do not auto-complete in the shell to have directory names like Music/. Just use ‘Music’. So, to create a playlist named GoodStuff.m3u with all the files in the Music directory of the Ipod and place that playlist in the Playlists directory, you would do a

./playlistmk Music Playlists GoodStuff

Conclusion

The truth is that the only people who are really looking to do this are probably regular Linux users who enjoy their podcasts or music.  But, this was not intuitive to me when I attempted to do this on my own.

I hope this helps someone.

If you have any questions or thoughts to add, feel free to leave them in the comments section below!  Subscribe to this blog for more great articles like this one.

Leave a Reply