home

radio is dead

It’s official. I’ve always despised radio. It’s just one of those businesses you know has stayed around because of some kind of deep entrenchment into lots of people’s pockets. The technology is dated — very dated, and the FCC (at least here in the US) mandates almost everything, except for what music is played — that is decided by who pays the most:

Sony Agrees to $10M ‘Payola’ Settlement

So here’s the alternative. You’ve got music, right? Your friends have music too, huh? Let’s create lots of radio stations from ourselves, and then time-shift them to allow playing on all kinds of devices (in your car, at home, jogging, etc.). Let’s make it seemless, and easy, and more importantly, easy to pay all those involved in producing (the artists, maybe?)

Here’s how I setup my radio station that streams all my music at home over a shoutcast server setup…. Read on….



We’re going to setup both the Shoutcast DNAS Server and the Shoutcast Transcoder. For more information on what these do, hit up shoutcast.com.

First, get the shoutcast DNAS server from shoutcast.com. At time of writing:

shoutcast-1-9-5-linux-glibc6.tar.gz

next, get the Shoutcast Transcoder from shoutcast.com. At time of writing:

sc_trans_posix_040.tgz from shoutcast.com

Unzip files:

# tar xzvf shoutcast-1-9-5-linux-glibc6.tar.gz
# tar xzvf sc_trans_posix_040.tgz
# cd shoutcast-1-9-5-linux…

Now edit sc_serv.conf –> change settings to your liking

# mkdir /usr/local/shoutcast
# cp sc_serv.conf /etc/
# cp sc_serv /usr/local/shoutcast/

test the server:

# /usr/local/shoutcast/sc_serv sc_serv.conf
*******************************************************************************
** SHOUTcast Distributed Network Audio Server
** Copyright (C) 1998-2004 Nullsoft, Inc. All Rights Reserved.
** Use “sc_serv filename.ini” to specify an ini file.
*******************************************************************************
Event log:
<07/25/05@22:54:52> [SHOUTcast] DNAS/Linux v1.9.5 (Dec 27 2004) starting up…
<07/25/05@22:54:52> [main] pid: 7541
<07/25/05@22:54:52> [main] loaded config from sc_serv.conf
<07/25/05@22:54:52> [main] initializing (usermax:32 portbase:8000)…
<07/25/05@22:54:52> [main] No ban file found (sc_serv.ban)
<07/25/05@22:54:52> [main] No rip file found (sc_serv.rip)
<07/25/05@22:54:52> [main] opening source socket
<07/25/05@22:54:52> [main] source thread starting
<07/25/05@22:54:52> [main] opening client socket
<07/25/05@22:54:52> [main] Client Stream thread [0] starting
<07/25/05@22:54:52> [main] client main thread starting
<07/25/05@22:54:52> [source] listening for connection on port 8001
<07/25/05@22:55:07> [sleeping] 0 listeners (0 unique)

it works, and it’s waiting for the relay connection, fire up another terminal

Now change into the scn_trans_posix directory and edit/vi sc_trans.conf -> edit to your hearts content

# cp sc_trans_linux /usr/local/shoutcast/

Now build a playlist:

# cd /usr/local/shoutcast/
# find /path/to/mp3/directory -type f -name “*.mp3″ > playlist.lst

Now give her a run:

# /usr/local/shoutcast/sc_trans_linux /etc/sc_trans.conf

now connect to your server (if you’ve got a firewall, may want to enable 8000 and 8001)

for instance on same server you can try:

http://localhost:8000/

click on listen, wallah

ok now to make it start on boot

I made a nifty shoutcast sysv style startup script based on previous work by a guy named spacemeat.

download this shoutcast file and chmod +x it — may want to edit it to reflect where your binaries are (in this case /usr/local/shoutcast/sc_….) and your config files in /etc/

# cp shoutcast /etc/init.d/

now test it first:

# /etc/init.d/shoutcast start

If all goes well, you can:

# chkconfig –add shoutcast

should start up on reboot now, you are good to go

fun stuff:

if you’ve got a nice firewall/router appliance (or another linux box)

you can add a firewall rule or port forwarding/triggering request
from your router’s appliance ports 8000-80001 tcp/udp to your shoutcast box

now with your dynamic dns you can get your music from anywhere:

http://your-dyn-dns-address:8000/

Now it’s time to setup some shell scripts for choosing content, and allowing on-demand grabbing of ANY song! next time….

One Response to “radio is dead”

  1. RC
    August 27th, 2005 07:32
    1

    I have been running a Shoutcast mp3 server for some time now in a similar way to yours and it’s, in my view, still one of the best audio streaming applications.
    I have only found one bug though. The log file created by the sc_trans_linux binary never stops growing. It actually broke one of my HD’s. I noticed that you place both binaries in one directory? Might this be the solution to that bug (as both use the same log file - sc_serv.log -?
    If so, it might be a good idea to mention that in your document.

    Nice and clear explanation by the way. Hope it makes more people see the advantage of a linux based mp3-server.

Leave a Reply

Type the word "seebq" here: