Unmaintained

This software is unmaintained.



Free Software

MySQL Based MP3 Streamer

Ever since I wrote and distributed the GNU MP3 Streamer people would ask me if there was any chance of a database version.

For a long time I resisted the temptation, because it's a hard thing to do well, and I could imagine several difficulties.

However in a rare moment of enthusiasm I put together a simple prototype.

This handles most of the important steps:

  • Indexing an MP3 collection to a database
  • Allowing browsing and streaming
  • Statistics collection
  • Searching for music

Having said that it's not a complete project, you will need to follow the instructions carefully, and there are some obvious things missing:

  • No support for non-mp3 media
  • No tag support

Any comments are appreciated though.

top
Requiremnets

To use this software you will need an MySQL database server, upon the same host as your MP3s.

You will also need a working Perl installation, with the following two additional modules installed:

Upon a Debian system these can be installed by running the following commands as root:

apt-get update
apt-get install libdbi-perl
apt-get install libhtml-template-perl
top
How It Works

The software is in two parts:

  • An indexer which scans a directory recursively looking for media content and inserting it into a database
  • A deamon which runs and listens upon a network port, answering requests with information stored in the database which the indexer inserted.

The indexer inserts the data into two tables, right now the tables are very simple. There is a table for directories and a table for files. (You can view the tables here).

These two tables allow the efficient processing of the directory and file indexes, to build up the webpages which are presented to the visitors.

The user interface is built up by some template files which are processed with the HTML::Template module before being sent to the browser.

When requests come in for files or directories the server will read it's content from the database and decide what to do with them. Right now there are some special URLs which are handled first, then the requests are used to build up the UI.

The special URLs are:

  • /stats/
    • Show the server statistics page
  • /search/
    • Show the search page
  • /play/xxx.mp3
    • Stream the file with the ID 'xxx' to the client.
  • /dir/xxx.m3u
    • Stream a playlist containing all the files in the directory ID xxx to the client.
top
Screenshots

Here are some screenshots - click to see fullsize:


Index

Stats Page

Search Page

Search Results

(The layout for the GUI was taken from that I used on Setuid.org, and is customizable if you wish to modify the display templates).

top
Download

Download from the following URL:

top