Jukeserver and Jukeplayer

Location of this document: http://www.iki.fi/sti/juke.html

Jukeserver and Jukeplayer

Description

Jukeserver can be used to broadcast MP3 music to your friends. They use Jukeplayer to tune in and listen to the music. The Jukeserver is just a short Tcl script that goes through a playlist you define. Even though it is just a script, it boasts the following features:

The Jukeplayer is a simple Tcl front-end to mpg123.

Download

Download the jukeserver and the jukeplayer.

Installation

Jukeserver and jukeplayer are Tcl script files. You can save them anywhere you like and turn on the execute permissions (chmod +x jukeserver jukeplayer).

Remember to change the name of the IRC server/channel/nickname at the beginning of the jukeserver script. You can do it with a normal text editor.

Usage

You can start jukeserver with or without a playlist file.

jukeserver [playlistfile]

If no playlist is provided, the jukeserver will wait until one is provided via remote control. Player connections are not accepted before the server has a playlist. Jukeserver waits for jukeplayers to connect to port 9998 and remote controllers to port 9999.

The jukeplayer takes just one parameter, the name of the jukeserver host.

jukeplayer host

To stop the player just kill it by pressing control-c. When the last player disconnects, the server stops itself and waits for new players. When the first player connects, the server continues from the next item on the playlist.

Remote control

The jukeserver can be controlled remotely by telnetting to the server host at port 9999 and issuing the following commands:

Tip: you can remotely define a new playlist with the command line:

(echo play ; cat newplaylist) | nc -w 1 server 9999

To do

It would be fun to have the player print out the name and artist of the song. However, to do that the server would need to be able to read ID3 tags. Also, the ID3 tags are at the end of the MP3 files which means the file would have to be retrieved and stored locally before sending it to the players. This could lead to a nasty delay between the songs.

Author

Sami Tikka

License

The permission to use, modify and distribute this program for any purpose is granted as long as you do not make false claims of authorship.

Front page