# [HOWTO] Shoutcast Streaming Server Guide

## texas1emt

[HOWTO] Shoutcast Streaming Server Guide

Major Hayden - February 14, 2005

1. Introduction & Premise

This guide explains how to set up a Shoutcast streaming music server.  It covers situations when the server and transcoder are on the same machine, and when they are on different macines. The entire installation should take between 15-30 minutes at most.

The system works by taking mp3 files and feeding them into a transcoder.  The transcoder in turn re-encodes the music and passes it to the server.  The server receives the stream and when listeners connect, the server splits the stream so that each listener can hear the mp3's.

Schematic

```
/----------\       /----------\           /---------------\-----------> LISTENER

|  YOUR    |       | TRANS-   | ENCODING  |    SERVER     |  MULTIPLE

|  MUSIC   |------>| CODER    |---------->|               |  STREAMS

\----------/       \----------/           \---------------/-----------> LISTENER

   *** MUSIC/TRANSCODER/SERVER CAN BE ON SAME MACHINE ***
```

2. Requirements

Gentoo Linux

Working network connection

Some MP3's (legal ones!)  :Very Happy:  

3.  Installing/Configuring the Server

First, let's install the Shoutcast server that we will be piping our music into.  We can't emerge it without first getting the file from Shoutcast's site (due to licensing/fetch restrictions).  If you try, you will get an error like this:

```
# emerge shoutcast-server-bin

Calculating dependencies ...done!

>>> emerge (1 of 1) media-sound/shoutcast-server-bin-1.9.5 to /

!!! shoutcast-1-9-5-linux-glibc6.tar.gz not found in /usr/portage/distfiles

!!! media-sound/shoutcast-server-bin-1.9.5 has fetch restriction turned on.

!!! This probably means that this ebuild's files must be downloaded

!!! manually.  See the comments in the ebuild for more information.

!!! The following are listed in SRC_URI for shoutcast-server-bin:

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

So, read the license agreement and then let's get the tarball, move it to the distfiles directory, and emerge it:

```
# wget http://www.shoutcast.com/downloads/sc1-9-5/shoutcast-1-9-5-linux-glibc6.tar.gz

# mv shoutcast-1-9-5-linux-glibc6.tar.gz /usr/portage/distfiles/

# emerge shoutcast-server-bin
```

Great, now let's edit the configuration file for a moment:

```
# nano -w /etc/shoutcast/sc_serv.conf

# There is one line in the file you MUST CHANGE

Password=changeme

# There are a couple of other lines you might want to alter

AutoDumpUsers=0

AutoDumpSourceTime=30
```

The password is used when we take the transcoder and pipe in the music to the server (which we'll do in a second).  AutoDumpUsers left as 0 means that we don't want users to be kicked off the stream if we accidentally cut off the stream for a period of time.  Setting it to 1 means you want users kicked off the server if the stream is disconnected.  AutoDumpSourceTime is the time that the server will sit without music coming from the transcoder.  If you leave it at 30 seconds, then after 30 seconds of silence from the transcoder, the server will kick the stream.

4.  Installing/Configuring the Transcoder

Now we've got to get the transcoder installed:

```
# emerge shoutcast-trans-bin
```

Let's edit its config file as well:

```
# nano -w /etc/shoutcast/sc_trans.conf

# Change the playlist line to look like this

Remember -> PlaylistFile=/opt/shoutcast/playlists/playlist.lst

# There's a few things we MUST change

ServerIP=localhost                  <--- use only if your transcoder/server are on the same box

ServerIP=your.linux.box.ip.address  <--- use only if transcoder/server are on diff boxes

Password=changeme                   <--- this is the password you set in /etc/shoutcast/sc_serv.conf

StreamTitle, StreamURL, Genre       <--- this data will be displayed to viewers, you choose it

# Example of my data

StreamTitle=Major's Music        <--- my server name

StreamURL=http://my.box.address  <--- my server address

Genre=Classical                  <--- I am going to jam out some classical music
```

There's a few other options you can edit in the file, like crossfading and your bitrate/samplerate/channel.

IMPORTANT - Remember that you need enough bandwidth to server all of your listeners.  If you're working off a cable modem, you can't pipe 160kbps tracks in stereo to 50 people.  :Smile: 

Also, remember the playlist file you denoted in /etc/shoutcast/sc_trans.conf.

5.  Setting Up A Playlist

Now, let's create our playlist.  I keep my mp3's for this server in /mp3/classical, but change this to what suits your server:

```
# find /mp3/classical/ -type f -name "*.mp3" > playlist.lst
```

Just to err on the side of caution, make sure your file names in the file have full paths, otherwise shoutcast's transcoder can't find them!

```
# cat playlist.lst

/mp3/classical/Heavy Classix - Wagner - The Ride of the Valkyries.mp3

/mp3/classical/Heavy Classix - Berlioz - Hungarian March.mp3

/mp3/classical/Heavy Classix - Borodin - Polovtsian Dance.mp3

/mp3/classical/Heavy Classix - Khatchaturian - Gayaneh Sabre Dance.mp3

/mp3/classical/Heavy Classix - Tchaikovsky - 1812 Overture.mp3

/mp3/classical/Heavy Classix - Berlioz - IV March of the Scaffold.mp3

/mp3/classical/Heavy Classix - Prokofiev - Montagues and Capulets.mp3

/mp3/classical/Heavy Classix - Holst - Mars The Bringer of War.mp3

/mp3/classical/Heavy Classix - Tchaikovsky - III Allegro Molto Vivace.mp3

/mp3/classical/Heavy Classix - Wagner - Lohengrin - Prelude to Act III.mp3

/mp3/classical/Heavy Classix - Mahler - IV Sturmisch Bewegt.mp3

/mp3/classical/Heavy Classix - Espana.mp3

/mp3/classical/Heavy Classix - Stravinsky - Infernal Dance.mp3
```

Now let's move that playlist to where the transcoder will be looking for it:

```
# mv playlist.lst /opt/shoutcast/playlists/playlist.lst
```

6.  Finalizing the Installation

All that's left to do is start the server and the transcoder, and (optionally) add it to the default runtime so that it loads on boot-up:

```
# /etc/init.d/shoutcast start

# /etc/init.d/shoutcast_trans start

# rc-update add shoutcast default

# rc-update add shoutcast_trans default
```

NOTE - The init scripts are great.  If you stop the server init script before stopping the transcoder script, it will stop both.  By the same token, if the server isn't running and you try to start the transcoder, the server automatically starts up.  Thank the smart Gentoo folks for that!

If you use IPTABLES for your firewall, make sure you adjust your rules!

```
// If your shoutcast server AND your iptables run on the same machine

# iptables -A INPUT -p tcp -m tcp --dport 8000 -j ACCEPT

// If your shoutcast server is behind the machine running iptables

// NOTE: Change 192.168.0.100 to the IP if your shoutcast server box

# iptables -t nat -I PREROUTING -i eth0 -p tcp --dport 8000 -j DNAT --to 192.168.0.100:8000
```

Your server should be going now!  Try it with XMMS or Winamp. Point them to the address for your server on port 8000, as in http://your.box.address:8000 and you should hear music.  Also, open up Firefox and go to the same address and you should get a nifty web status, plus past songs.

7. Fun Stuff

If you want to see who is listening, kick/ban people, or reserve spots for certain listeners by IP, click the ADMIN link on the far right of the web status page.  Use "admin" for your username and use the password from /etc/shoutcast/sc_serv.conf to login.  Once you login to the page, you can tweak all kinds of stuff, and ruin someone's day if you don't want them to listen to your stuff!  :Wink: 

What happens if you want to add new tracks to the server?  What happens if you don't like the current track and want to advance to the next track?  What if you want to quit shuffling the music and make it play straight through?  You can!

Issue these commands (as root) from the command prompt:

```
// To advance to the next song

# killall -s WINCH sc_trans_linux

// After you change the playlist a little, reload it

# killall -s USR1 sc_trans_linux

// Toggle shuffle play on and off

# killall -s USR2 sc_trans_linux
```

KEEP IN MIND that your commands will not go into effect immediately.  Due to buffering, it sometimes takes 20-30 seconds for you to hear it switch to the next track (which it will crossfade into, if you left the default crossfade in the conf).

Enjoy your new music server and get in touch with me if you have any questions about the setup.

LEGAL NOTICE:  :Rolling Eyes: 

I don't want to rain on your parade, but PLEASE UNDERSTAND that streaming YOUR music to other people is a violation of copyright law unless you have been given the right to play the music, or the music is in the public domain.  You're more than welcome to stream the music for your own benefit, but please do not violate any copyright laws by using this server to broadcast music illegally.  I am in no was advocating the infringement of any copyrights and I am not supporting music piracy in any form.

Also, Shoutcast is a copyright of Nullsoft.  I am in no way associated with either.  With that said, enjoy your music!  :Smile:  

Revisions:

14-Feb-05: Initial Writing

----------

## d_m

Have you ever used icecast? I find that it works very well, and it is open-source. What advantages do you think shoutcast has over it (in your opinion)?

Thanks for the guide... I think a lot of people will find it useful!

----------

## texas1emt

I've installed icecast before, but I just didn't like the way it was set up.  I used shoutcast before it was even in portage and I liked it.  Now that it's in portage, it's a lot easier to set up.

I am told that icecast can do line-in broadcasts with some type of module or something called 'darkice', but I just want a simple streamer for my server for my own personal use.

Thanks for the comments, hopefully the HOWTO helps some people figure this out.

----------

## elmo[bjoern]

hi,

I think the big advantage of using shoutcast is, that you reach more people via the shoutcast directory server. 

For example they currently have over 8000 servers listed there but icecast only got about 600 in their list. I'm not quite sure if it is possible to show up an icecast server in the shoutcast directory, but i think it's currently not.

----------

## texas1emt

 *elmo[bjoern] wrote:*   

> I think the big advantage of using shoutcast is, that you reach more people via the shoutcast directory server. For example they currently have over 8000 servers listed there but icecast only got about 600 in their list. I'm not quite sure if it is possible to show up an icecast server in the shoutcast directory, but i think it's currently not.

 

You've got a point bjoern, and I didn't think about that either.  Going to http://www.shoutcast.com/ can bring you TONS of streams of any variety.  And AFAIK, you're right about the icecast and shoutcast directory incompatibility.

----------

## localjoe

some notes on broadcasting...

I'm station engineer for a college radio, and we broadcast our live stream out over the net via shoutcast.

if you want to broadcast live, your transcode playlist will need the following

DSP:/dev/dsp

DSP:/dev/dsp

then set your rate options, etc, etc...

if the song title is showing up as ( now playing dsp) then you can just symlink a cool name or the station ID  to dsp, and put that in the playlsit file instead of /dev/dsp

also, you really should save your logs, that's not mentioned above.

we have over 20 shows now, and making use of streamripper and good old cron allows for the DJ's to have copies of their shows INSTANTLY after their block is complete.

----------

## Prometeus

Hi,

I've already installed and set up shoutcast server and trans (thanks for the HOWTO, texas1emt), and they work like a charm, but something annoys me... I don't know why but no matter which option I activate/desactivate in the trans config file it doesn't send the song title to the server (at least that's what I guess), meaning:

- No song history (from the shoutcast server web interface)

- No proper song title displayed on the client (listener)

I installed shoutcast before on Linux (not from the portage tree but from shoutcast.com) and it had no problem with the song title. But this time I emerged shoutcast trans and server, and the way they work seem to be different.

What should I do?  :Sad: 

I know it's not a "problem" since the streaming is working great, but I wanna see the song title and the song history.

Any help will be appreciated, guys.

----------

## vesqu

Hello,

I'm wondering with the same subject; how to (if at all) provide song information to client (and to song list in web interface) ...  great as is but with this song information even greater  :Smile: 

----------

## jmack1010

When i try to connect to my shoutcast server I get the error:

 *Quote:*   

> Server Status:   Server is currently down.
> 
> 

 

However, I am getting the web interface for shoutcast.  I think their is something setup wrong with my shoucast server, but it loads correctly without error at boot.  The only sign that something may not be loading correctly is after the init script is loads shoutcast server displays:

 *Quote:*   

> Use "sc_serv filename.ini" to specify an ini file"

 

I am running behind a linksys firewall, however I forwarded port 8000 to my shoutcast server, and I am getting the right web interface.  But I am not sure if it is not the cause of my troubles.

If you need any more info (I am not sure what is pertinent) I will be happy to post.  Thank you for your help!

Joe[/quote]

----------

## Prometeus

 *jmack1010 wrote:*   

> When i try to connect to my shoutcast server I get the error:
> 
>  *Quote:*   Server Status:   Server is currently down.
> 
>  
> ...

 

Where do you get that message? Running the shoutcast transcoder (sc_trans)?

 *jmack1010 wrote:*   

> 
> 
> However, I am getting the web interface for shoutcast.  I think their is something setup wrong with my shoucast server, but it loads correctly without error at boot.  The only sign that something may not be loading correctly is after the init script is loads shoutcast server displays:
> 
>  *Quote:*   Use "sc_serv filename.ini" to specify an ini file" 
> ...

 

Seems like sc_serv can't find a proper config file... Make sure you have this file:

```
/etc/shoutcast/sc_serv.conf
```

with read and write permission set just for its owner, root. If so, check the configuration: you have to set a password fot the server.

 *jmack1010 wrote:*   

> 
> 
> If you need any more info (I am not sure what is pertinent) I will be happy to post.
> 
> 

 

If the above doesn't work for you, it would be helpful to know the content of your sc_serv.conf and sc_trans.conf files, and how are you starting the server and the transcoder.  :Wink: 

----------

## cormacs

ive a small problem with shoutcast that Im trying to figure out - any help aprpeciated.  Using Redhat and shoutcast

Im using sc_serv and sc_trans.  the first minor problem, is that even though everything works dandy, I have to start both up separately as sc_trans doesnt start sc_serv.  I take it thats a config problem on my end somewhere.

the major problem Im having goes something like this:

Currently I start sc_serv (or already have it running in the background)

Then i start a live broadcast.

thirdly I start sc_trans

finally once i quit the live broadcast the on-demand kicks in.  everythings fine up til there.

Once though I try to start a live broadcast whilst sc_trans is running,i get connection errors, as obviously theon-demand stream is using the port.

now - is that the way its meant to work (as in shutting down sc_trans before starting a live broadcast) or is sc_serv meant to be listening for a live stream on  8001 and then knocking off the on-demand?

At the minute I suppose if DJs stuck rigidly to their schedules, a cron job could be set up, but i was hoping to have something more flexible which would let people kick off a live show whenever they wished (as long as no-one else was broadcasting live at teh time)

any help gladly sought  :Wink: 

----------

## jmack1010

I found what the problem was with the configuration file, I had to take the Remember-> pointer where it points to the playlist file. *Quote:*   

> # Change the playlist line to look like this 
> 
> Remember -> PlaylistFile=/opt/shoutcast/playlists/playlist.lst 

 

Thank you,

Joe

----------

## karan

Also, its possible to use xmms-LiveIce in conjunction with shoutcast. At the moment i'm using my desktop computer to write this and i'm playing music with xmms.

Xmms-LiveIce is forwarding this upstairs to my server, which is serving my stream via my website. Shoutcast is always on, but it only broadcasts when I listen to music down here.. which I think is pretty cool.

----------

## jflintz

This is my second try at doing setting up a server. Over a year ago I set one up with shoutcast for my lan and it went with no problem.

Since then I did a reinstall of gentoo due to a new/bigger harddrive for my file server.

Followed your HOWTO and for some reason I can get the server to run but can not connect to it.

what I get from the logs is

<07/26/05@13:50:48> [SHOUTcast] DNAS/Linux v1.9.5 (Dec 27 2004) starting up...

<07/26/05@13:50:48> [main] pid: 21178

<07/26/05@13:50:48> [main] loaded config from /etc/shoutcast/sc_serv.conf

<07/26/05@13:50:48> [main] initializing (usermax:32 portbase:8000)...

<07/26/05@13:50:48> [main] No ban file found (sc_serv.ban)

<07/26/05@13:50:48> [main] Loading rip list (sc_serv.rip)

<07/26/05@13:50:48> [rip] Added 1 IP to Reserve List

<07/26/05@13:50:48> [main] opening source socket

<07/26/05@13:50:48> [main] source thread starting

<07/26/05@13:50:48> [source] listening for connection on port 8001

<07/26/05@13:50:48> [main] opening client socket

<07/26/05@13:50:48> [main] Client Stream thread [0] starting

<07/26/05@13:50:48> [main] client main thread starting

<07/26/05@13:50:48> [source] connected from 192.168.0.3

<07/26/05@13:50:49> [source] icy-name:Flintz Radio: Flintz Music ; icy-genre:Alt

<07/26/05@13:50:49> [source] icy-pub:0 ; icy-br:80 ; icy-url:http://192.168.0.3/

<07/26/05@13:50:49> [source] icy-irc:N/A ; icy-icq:N/A ; icy-aim:N/A

<07/26/05@13:50:54> [dest: 192.168.0.4] starting stream (UID: 0)[L: 1]{A: xmms/1.2.10}(P: 0)

<07/26/05@13:50:54> [dest: 192.168.0.4] connection closed (0 seconds) (UID: 0)[L: 0]{Bytes: 0}(P: 0)

Any ideas?

Thanks

----------

## jflintz

never mind... I tried playing the stream through mplayer and it worked fine. Figured it is something to do with xmms so I am upgrading gettext to the latest version and re-emerging xmms to see if that helps with xmms and listening to the stream.

[EDIT]

I had to disable MAD in the xmms preferences and emerge xmms-mpg123 for it to work.....

ALL is good now.

----------

## Bigun

*bookmarked*

----------

## tkhobbes

Hi all

I can't restart neither the shoutcast nor the shoutcast_trans service; when using /etc/init.d/shoutcast restart or stop, it gives me something like

```

 * Stopping Shoutcast Trans ...

start-stop-daemon: warning: failed to kill 8751: No such process                              [ !! ]

 * ERROR:  problems stopping dependent services.

 *         "shoutcast" is still up.

```

Also, I have the same problem as jmack1010; when using the web-interface, it says "server currently down" and I can't listen to any stream.

Using the "Remember ->" thingy in sc_trans.conf did not help anything (I followed this how-to word by word)...  :Sad: 

thomas

----------

## Bigun

It isn't starting and the init script didn't realize it didn't start.  Make sure it isn't running:

```
ps -A | grep shout
```

If it isn't running try this:

```
# /etc/init.d/shoutcast zap

# /etc/init.d/shoutcast_trans zap
```

That should reset the scripts.  I would then check your log files and see what happened.

*EDIT*

Also, this walkthough didn't mention that you need to tell shoutcast_trans what playlist to use, I would change the path manually to what you want it set to.  I bet $100 that's what's happened.

```
nano -w /etc/shoutcast/sc_trans.conf
```

Then edit this line:

```
PlaylistFile=/mnt/media/playlists/playlist.lst
```

----------

## tkhobbes

Well - I did everything you said but still have the problem - "server is currently down", and nothing is streamed to my workstation...  :Sad: 

Also, when I do a shoutcast start, it says

```
 * Starting Shoutcast Server ...

*******************************************************************************

** SHOUTcast Distributed Network Audio Server

** Copyright (C) 1998-2004 Nullsoft, Inc.  All Rights Reserved.

** Use "sc_serv filename.ini" to specify an ini file.

*******************************************************************************               [ ok ]
```

Is that normal?

thomas

----------

## Bigun

Yup... completely.....

Basically the server is up waiting on a stream from somebody or something.

The easiest way to stream data to the server is to install xmms-liveice:

```
 emerge xmms-liveice
```

Then open XMMS, configure the plug-in to your address, to port 8001 (unless you changed it) then type your password.  Load up an MP3 and hit play.  Then it should start streaming to your server.

----------

## tkhobbes

No, I think I was not clear enough; I have a Windows-client, and when hitting "stream" in the web-interface, iTunes opens - but it does not play anything, even when I hit "play" manually...

----------

## Bigun

Well, if the shoutcast page says that it is currently down, then it isn't recieving music somehow.  So the first problem is that you have to get music streamed to it first, either by you remotly or at the local machine itself.  There are severeal way to do this:  xmms-liveice, winamp with the shoutcast plugin, muse, shoutcast_trans, darkice w/ darksnow, so on and so forth.  Once you've gotten the shoutcast page to say that it isn't down, then worry about listening to it.

Here's a little hint though, attempting to stream to your machine and listen to it on the same machine.... big pain, get a friend to check it out for you.

----------

## tkhobbes

Well, as said, I followed the how-to word-by-word - so shoutcast_trans is running, or at least, should be...

----------

## Bigun

Check to make sure it is running:

```
ps -A | grep trans
```

If you see nothing, try to stop shoutcast_trans with the init script:

```
/etc/init.d/shoutcast_trans stop
```

You will probably get an error about a process not being there.  In which case shoutcast_trans never got a chance to start.  

```
/etc/init.d/shoutcast_trans zap
```

Now... check your....

Um... nevermind.... just looked at the thread.... glad you got it solved.

----------

## tkhobbes

Well - silly me... and thanks to you, I found out just HOW silly I am...  :Embarassed: 

I forgot to set the correct IP of the soutcast-server in shoutcast_trans.conf...  :Smile: 

Now, everything is working fine.

----------

## deadstar

Well, I FINALLY got it working....

The playlist is "playlist.lst" not "playlist.1st"     :Laughing: 

Anyway, a simple question:

My MP3's are sorted into subdirectories of the Band name and Album. How do I create such a playlist?

Secondly, whatever I set the bitrate too, it sounds like a set of broken laptop speakers. It's going across a gigabit LAN so not worried about bandwidth, whatever the fix.

Thanks in advance.

----------

## GoofballJM1

 *deadstar wrote:*   

> Anyway, a simple question:
> 
> My MP3's are sorted into subdirectories of the Band name and Album. How do I create such a playlist?
> 
> 

 

Do what I did.  I have all my mp3's in my /home/myusername/ directory, under a folder called mp3.  My music is sorted the same way as you.

```
# find /home/myusername/mp3/ -type f -name "*.mp3" > playlist.lst
```

It will look in all the sub-directories.  All it is doing is spitting out the results of your search into a text file.  In this case the wildcard * is your friend.  Good luck  :Laughing: 

This is a great Howto BTW, been running my gentoo shoutcast server for several months without a hitch.  Only complaint is on my P3 500 it runs on, the transcoder uses about 40% of my CPU when its running.  But much better than I had it on a windows 2000 server for the previous 2 years. I had all sorts of problems, and had to reboot the thing constantly.

----------

## BaseBoy

Hey,

I have everything running but after a few ours the sc_trans_linux is killed automatically.

How can I solve that problem so the server is always up. With a script ore something. 

Greets BaseBoy

----------

## starachna

hallo everyone, thanks for the great how to texas1emt!

i have followed the howto and it does play mp3 streams but the music is way too fast?  

my input sample rate that i ripped the mp3 with is this:

InputSamplerate=11025

and the bitrate is 32kps

i have tried various settings, which i thought made sense to me, but nothing changes, maby it plays it faster or a little slower, but it's still VERY fast hehe

if someone can help me out i'd really appreaciate it  :Smile: 

thanks a mil!

ciao/riaan

----------

## starachna

@BaseBoy

check your logfiles for errors, but you can try and use 

app-admin/monit

----------

## Psih

Hi everyone  :Smile: 

Setting up shoutcast was easy (I even haven't read any mans or howto's - it's just too simple), but I have another relaited question.

My Radio will have Live broadcasts with DJ's, but for the night ofcource no one will be live on radio, so I have quite an interesting question:

Is it possible to keep music on the server and play it from playlist AND WHEN A Dj want's to connect the Shoutcast server, the transcoder stops and shoutcast server streams the Dj provided (from a remote PC) stream. When Dj disconnects, transcoder automaticaly start's to play playlist.

Need this realy a lot..   :Rolling Eyes:   :Exclamation: 

----------

## GoofballJM1

Yes it is.  In fact the easy way you can do this is using the Winamp Shoutcast DSP plugin for windows to stream live.  All you would have to do is have the password for the stream and turn off the MP3 stream from the server when broadcasting live.  I have done this for radio broadcasts at my station numerous times.

----------

## Dharius

Hi !

I've one pb... I think that sc_trans do not use my .conf file (but i check & there is only one), so

- to start, i need to do "/etc/sc_trans/sc_trans_linux /etc/sc_trans/sc_trans.conf"; just "/etc/sc_trans/sc_trans_linux" doensn't works

- when i'm doing "killall -USR1 sc_trans_linux" it doesn' works

-> it's the same problem : it seems to don't find the .conf because it said that there is nothing in the playlist... 

What is the pb ??

----------

## sleepingsun

Thanks a lot i dont have problems working perfect thanks for this briliant guide !

----------

## Tim2k

I don't want to run shoutcast as root, so what do i have to do when i want to start shoutcast and shoutcast_trans-startscript as a normal user @ system-startup?  :Smile: 

----------

## mno

This is a hunch:

In the logs, I get messages that say:

```
<09/25/07@18:41:01> [CONFIG] WARNING: No InputSamplerate defined, assuming 44100!

<09/25/07@18:41:01> [CONFIG] WARNING: No InputChannels defined, assuming 2!
```

Each instance of shoutcast_trans can only recode from 1 samplerate (that of the song) to 1 samplerate (that of the server). If you have songs from diff samplerates, you can probably start different sc_trans servers running off different config files, and adding the parameters InputSamplerate and InputChannels into the config file for each server. The output for all sc_trans instances would have to be that of the sc_serv. Of course, this would mean that you'd need to manually start them, not using the init.d script. 

But still  :Smile: 

----------

## mno

Just a quick question,

Would anyone know what would lead me to get this error message:

```
<09/25/07@18:54:06> [MAIN] Title Update Failed
```

Thanks!

----------

## trossachs

Is it possible to have 'virtual servers' working under Shoutcast as I do with Apache?

----------

## Bio

 *Tim2k wrote:*   

> I don't want to run shoutcast as root, so what do i have to do when i want to start shoutcast and shoutcast_trans-startscript as a normal user @ system-startup? 

 

You need to create a dedicated user, say shoutcast per example, myself i also created a shoutcast group. 

```
useradd -d /dev/null -s /bin/false -c "Shoutcast daemon user" shoutcast
```

Then you need to change the shoutcast's files permissions so this user and/or group can read them. I chose to keep root as the owner of the files.

```
chown -R root:shoutcast /opt/shoutcast/*

chown -R root:shoutcast /etc/shoutcast/*
```

Make sure only root has write permission and that the shoutcast group can read and execute the binary files, and read the config files (chmod)

The you need to modify your init scripts, both /etc/init.d/shoutcast and /etc/init.d/shoutcast_trans. In the start section of the scripts modify the start-stop-daemon line and add the followin option "-c shoutcast". So the daemon is run with your user.

```
start() {

        checkconfig || return 1

        ebegin "Starting Shoutcast Server"

        start-stop-daemon --start -c shoutcast --quiet --exec /opt/shoutcast/sc_serv /etc/shoutcast/sc_serv.conf &

        eend $?

}

```

Then if you enabled shoutcast's loging make sure your shoutcast user can write to your log files. Also if you rotate your logs make sure the newly created logs have the same permissions (see logrotate configuration). The same applies if you defined a BanFile and a Reserved IP List files in your sc_serv.conf file make sure those 2 files are writable to your user.

Finally for your shoutcast server to be able to play some music you need to be sure that your shoutcast user can read your mp3 files. So check your permissions, if needed tweak your groups.

Then you should be able to run shoutcast as an unprivileged user.

```
ps -ef | grep sc

root     29362     1  0 12:56 pts/4    00:00:00 /bin/bash /sbin/runscript.sh /etc/init.d/shoutcast start

1010     29365 29362  0 12:56 pts/4    00:00:00 /opt/shoutcast/sc_serv /etc/shoutcast/sc_serv.conf

root     29376     1  0 12:56 pts/4    00:00:00 /bin/bash /sbin/runscript.sh /etc/init.d/shoutcast_trans start

1010     29380 29376 11 12:56 pts/4    00:01:12 /opt/shoutcast/sc_trans_linux /etc/shoutcast/sc_trans.conf

```

*1010 is tue UID of my shoutcast user

----------

## ama

I'm trying to broadcast with southcast from the soundcard but no sound comes out. It works if I use a mp3 file as the source. Any Idea why that is?

here is my transcode playlist code:

DSP:/dev/dsp

DSP:/dev/dsp

----------

## NeoSK

Heya, I have one question

I did notice that when using shoutcast transcode, even on 128kbit it cuts off high frequencies resulting in a little "dimmer" sound output, which I personally dislike. Is there any alternative to shoutcast transcoder? (I mean ... it's a standalone program, an alternative should be able to feed the server with anything, just maybe different processing?).

Also, are there maybe other live stream alternatives to shoutcast?

----------

## audiodef

 *texas1emt wrote:*   

> 
> 
> Let's edit its config file as well:
> 
> ```
> ...

 

What's this for? I just installed Shoutcast and doing it this way fails. I have to use the originally intended format in the default conf file.

----------

## srroom

This is a great SHOUTcast streaming server guide. However, could you be interested in posting an up to date guide? This post dates back from 2005 and I am sure there are a lot of people interested in learning how to set up their streaming servers right now. Thanks!

----------

## hujuice

We must be grateful to texas1emt, who wrote this guide in the far 2005.

Anyway, Gentoo has now an official guide about: http://www.gentoo.org/doc/en/shoutcast-config.xml

The guide is relative the the version 1.9.8 of SHOUTcast, the last available in portage.

SHOUTcast 1.9.8 is a great software (I bother saying it, it is CLOSED source).

The whole universe of music internet streaming was born from there.

It is a very rude software, but it is... rock!  :Cool: 

NullSoft has released a new version (2), not yet in portage.

Reading about (never tried it), it should be not so different in management.

So, for people wanting to learn about, starting from the portage version is a good idea.

Then you can easily step to the version 2.

Regards,

HUjuice

----------

## getmepaid

Anyone got a solution for this?

I am having trouble getting it to work and can't find answers on internet

 *ama wrote:*   

> I'm trying to broadcast with southcast from the soundcard but no sound comes out. It works if I use a mp3 file as the source. Any Idea why that is?
> 
> here is my transcode playlist code:
> 
> DSP:/dev/dsp
> ...

 

----------

