MySQL-MP3 is a MySQL-based MP3 streamer.
Version: 0.5MySQL-MP3 is a MySQL-based MP3 streamer.
Operating System: Linux
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.
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.
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:
Show the server statistics page
Show the search page
Stream the file with the ID 'xxx' to the client.
Stream a playlist containing all the files in the directory ID xxx to the client.