Venus Music Server

Venus Music Server is a compact PHP script that allows you to browse and play a collection of MP3s via a web browser.

Features:

Screenshots:

Main page
Automatic image support
Automatic text support
(Screenshots are in PNG format)

Download:

Download Venus Music Server from SourceForge.

Requirements:

Linux 2.x
Apache 1.3.x
PHP 3.x
'at' and 'atd'
Tested using Mandrake 7.0 - everything above is included and configured out-of-the-box.

Basic knowledge of Linux is required to set up Venus:


Copyright (C) 2002, Mike Perry

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.


Venus Music Server software is proudly hosted by SourceForge.

SourceForge Logo


README

Requirements:
Linux 2.x
Apache 1.3.x
PHP 3.x
'at' and 'atd'
I'm using Mandrake 7.0, and everything above is included and configured out-of-the-box. Never tried it on another system...

Oh, and you _will_ of course need to have root permissions to set this all up.

About:
Basically, this PHP script will list all mp3s and directories in a pre-defined directory. I want to download and play the songs from a browser, but I want to prevent users from hard-linking to the actual mp3 files. HTTP streaming to symlinks of the original files is the solution I chose. This script creates playlists and symlinks to the original files on demand, and an 'at' job nukes 'em after 5 minutes.

Sounds a little like my.mp3.com, doesn't it? ;-)

The other goal was to make this run on almost any linux box that has a semi-recent distro installed. This script only needs linux 2.x, apache 1.3.x, and php 3.0.x. And that's it. (It probably runs on somewhat older stuff too - try it and tell me!)

Oh hey, if you don't care about users linking directly to your mp3s, then check out a script called Andromeda at http://www.turnstyle.com/andromeda/. Very nice - has a bunch more features than this and it looks way better. 'Course, I wouldn't let anyone link directly to my files, and I sure wouldn't put MP3s in my web root, but hey...

Setup:
1) You will need a directory/mount/share whatever that will contain all of your mp3 files. This directory MUST BE READABLE by user NOBODY (the default apache/php user). Do NOT put this directory in your web root (we're trying to prevent direct links and downloads, remember?)

2) Dump a buncha mp3s in that shared dir. Don't forget to check that they are readable by user "nobody". I recommend making a seperate directory for each album (keeps things manageable, IMHO).

2.1) NEW - stick some jpgs and txts in the directories too!

3) Make another directory somewhere else for the symlinks and playlists. It MUST BE READABLE/WRITABLE/EXECUTABLE by user NOBODY (the default apache/php user).

4) Edit your Apache config (httpd.conf) and add the symlinks/playlists directory as an alias. Something like this:
Alias /songbase /lanshare/streamsource
<Directory /songbase>
AllowOverride None
Options FollowSymLinks
</Directory>

5) Change all of the defaults in the 'MAIN CONFIG' section to match the stuff you did in the previous steps. Here's what mine looks like:
//////////
// MAIN CONFIG

// where all of your mp3 files and directories are located
// must have trailing backslash
// MUST BE _READABLE_ BY USER 'nobody' (or whatever username is used by the server)
// RECOMMENDED TO _NOT_ BE IN THE WEB ROOT (prevent web user hard links)
$root = "/lanshare/mp3s/";

// temp directory to store symlinks and playlists
// must have trailing backslash
// MUST BE _READABLE_ and _WRITABLE_ BY USER 'nobody' (or whatever username is used by the server)
$streamsource = "/lanshare/streamsource/";

// apache virtual root to playlists and symlinks
// must have trailing backslash
// NEEDS TO BE ADDED TO APACHE CONFIG - POINTS TO ABOVE DIRECTORY
$streamshare = "songbase/";

// directory to store log file
// must have trailing backslash
// MUST BE _READABLE_ and _WRITABLE_ BY USER 'nobody' (or whatever username is used by the server)
$logfilepath = $streamsource;

// END CONFIG
//////////

6) Restart apache, hit the URL, and enjoy.

Wanna make script this better? Do it. Then tell me about it on the project's SourceForge page!