Ecco un breve tutorial un po' specifico che mi è stato richiesto, lo posto anche qui, mi sembra simpatica come cosaVediamo innanzitutto i requisiti:
* shoutcast server reperibile su www.shoutcast.com/
* encoder mp3 lame reperibile su lame.sourceforge.net/
* xmms www.xmms.org
* plugin per xmms... liveice star.arm.ac.uk/~spm/software/liveice.html
* una connessione a banda larga
Iniziamo ad installare xmms, molti utenti lo avranno già sul proprio hard disk, essendo esso la copia di Winamp per Linux e strumento indispensabile per tutti gli smanettoni amanti della musica A questo punto, provvediamo ad installare lame, possiamo farlo via sorgente o con un comodo rpm, l'importante è assicurarci che l'eseguibile lame si trovi all'interno del nostro $PATH, per fare questo usiamo il comando
Codice:
find / -name lame
echo $PATH
E controlliamo che la directory in cui è contenuto lame compaia all'interno della variabile percorso. Possiamo ora procurarci il server shoutcast e decomprimerlo usando il comando
Codice:
tar -zxf shoutcast.tar.gz
Portiamoci all'interno della directory creata, di default dovrebbe essere mi sembra sc_serv, ed apriamo con il nostro editor di testo preferito (vim ) il file sc_serv.conf che contiene la configurazione del server shoutcast. Le voci più interessanti ed indispensabili da settare sono queste.
Citazione:
; MaxUser. The maximum number of simultaneous listeners allowed.
; Compute a reasonable value for your available upstream bandwidth (i.e. if
; you have 256kbps upload DSL, and want to broadcast at 24kbps, you would
; choose 256kbps/24kbps=10 maximum listeners.) Setting this value higher
; only wastes RAM and screws up your broadcast when more people connect
; than you can support.
MaxUser=4
Citazione:
; Password. While SHOUTcast never asks a listener for a password, a
; password is required to broadcast through the server, and to perform
; administration via the web interface to this server. This server should
; consist of only letters and numbers, and is the same server your broadcaster
; will need to enter in the SHOUTcast Source Plug-in for Winamp. THIS VALUE
; CANNOT BE BLANK.
Password=guybrushfico
Citazione:
; PortBase. This is the IP port number your server will run on. The
; value, and the value + 1 must be available. If you get a fatal error when
; the DNAS is setting up a socket on startup, make sure nothing else on the
; machine is running on the same port (telnet localhost portnumber -- if you
; get connection refused then you're clear to use that port). Ports < 1024
; may require root privledges on *nix machines. The default port is 8000.
PortBase=8000
Oltre a ciò vi sono le opzioni per il logging e per una gestione più avanzata, l'utente medio può trovare divertenti anche i campi TitleFormat ed URLFormat, dateci un'occhiata Possiamo poi avviare il server in background con il comando
Codice:
./sc_serv &
Compiliamo ora liveice, esso non è altro che un plugin per xmms che invia al server shoutcast l'mp3 che stiamo ascoltando attualmente. Apriamo xmms, premiamo ctrl+p, effect/general plugins, dalla lista selezioniamo LiveIce 1.0.0, clickiamo sul quadratino use plugins, quindi su configure. Sample rate e stream bitrate metteteli come desiderate, tenete conto che maggiori essi sono, maggiore banda vi saluta... Sotto encoder type selezioniamo Lame 3.21 & above e come executable name specifichiamo lame. A questo punto sotto server mettiamo come server address 127.0.0.1 che sarebbe il localhost, mettiamo come password guybrushfico e come porta selezioniamo la 8001, visto che shoutcast ascolta sulla porta successiva a quella specificata in sc_serv.conf, applichiamo i cambiamenti ed iniziamo a streamare. Possiamo ora dare ai nostri amici questo url http://mio-ip:8000 per far loro ascoltare la nostra splendida radio Enjoy life...