Skip to content
TiTi edited this page May 5, 2013 · 4 revisions

Fetch source

Use git clone or download zip, ...

Setup

cp jukebox.cfg.example jukebox.cfg

Made changes if needed to your jukebox.cfg

Start the server

ruby jukebox.rb

Si tout va bien voici la premières trace:

$titi@jukebox: ruby jukebox.rb
[2013-05-03 00:37:39 +0200] [info] library initialized.

Encode your first mp3

La première fois, il faut alimenter la library avant de pouvoir connecter des clients. Pour ce faire, il faut ajouter des mp3 dans le dossier source_dir (du jukebox.cfg), puis attendre que le serveur re-encode ces fichiers. Par défaut ce dossier est le dossier mp3.

Il faut donc le créer et mettre 1 ou plusieurs mp3, avec de bons ID3Tags.

Lancer le serveur et attendre un peu, voici ce que ca donne :

$titi@jukebox: ruby jukebox.rb
[2013-05-05 17:07:11 +0200] [info] library initialized.
[2013-05-05 17:07:41 +0200] [info] Encoding mp3/05-armory.mp3 -> encode/05-armory.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
    	version 1.12.1; written and copyright by Michael Hipp and others
        free software (LGPL/GPL) without any warranty but with best wishes

Directory: mp3/
Playing MPEG stream 1 of 1: 05-armory.mp3 ...
Title:   Armory                          Artist: Daft Punk
Comment:                                 Album:  TRON: Legacy
Year:    2010                            Genre:  Soundtrack
MPEG 1.0 layer III, VBR, 44100 Hz joint-stereo
[2013-05-05 17:07:42 +0200] [info] Encoding mp3/19-arrival.mp3 -> encode/19-arrival.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
        version 1.12.1; written and copyright by Michael Hipp and others
        free software (LGPL/GPL) without any warranty but with best wishes

Attention, l'opération d'encodage utilise à fond votre CPU !

Connect

Une fois qu'on a au moins un titre dans la base de données, on peut connecter des clients. Soit via l'interface web, winamp, VLC, ou n'importe quel autre lecteur de flux audio !

From any player:

http://<host>:<port>/stream

See your jukebox.cfg for port.

With credentials:

http://user:pass@<host>:<port>/stream

Stop the server

Pour arrêter le serveur : Ctrl + C

Clone this wiki locally