Traktor plus Icecast plus StreamTranscoder plus Shoutcast
- Posted: 7 months ago
- Tags:icecast, radio, shoutcast, streamtranscoder
- 0 comments
I have been running an internet radio station for the greater part of the past year now. Originally I had hooked this up to be a mostly auto pilot project, and my setup consisted of uploading mp3 files to one of my co-located servers, and then having mpd stream to shoutcast, so that it was sort of like iTunes in the sky.
As the year has progressed I have been getting more and more into music in ways I could never have imagined. I have been learning how to mix, and gathering an insane amount of music. Needless to say, after the first few sessions I was determined to figure out how to broadcast traktor straight to shoutcast.
At first this seems trivial right, because Traktor has support for internet radio broadcasting, yay! Wrong. Turns out Traktor did not want to pay royalty fees to license mp3 technology in a way so they can stream it so they decided to cheap out (it's not like Traktor is free, c'mon N.I.!) and only support the less popular (but totally decent) Ogg format.
This being the case, that means that to successfully plug Traktor into shoutcast we have to run a middle man program, via one method or another. The first method I tried was Nice Cast which is a mac friendly application that simply takes the raw output of your soundcard, transcodes it to your desire, then sends it to shoutcast for you. In practice this is not too bad of a solution but there was several reasons I was not feeling it, including added latency, wonky gain levels, occasional distortion, and the fact that its closed source and a mac only app (no running it on a unix server).
More after the break...
So, after some more reading, I decided that I was going to take another approach all together. The new approach would introduces 2 more server based applications, but enables me to simply broadcast straight from traktor to my shoutcast station (and shoutcast directory). This approach involves:
- Setting Up Traktor To Stream To IceCast
- Setting Up IceCast
- Setting Up ShoutCast
- Setting Up StreamTranscoder to pull from IceCast and push to ShoutCast
Before embarking you should have a basic knowledge of whatever unix operating system you are going to be using for the streaming and how to install and configure software for it.
1. Setting Up Traktor To Stream To IceCast
This is the easiest part probably. Head into the configurations and settings are of Traktor. Head to the broadcasting section. The only area we need to change is server settings.
Server Address: YOUR.SHOUTCASTDOMAIN.COM ( for me its radio.spotman.net. this should be the internet hostname of whatever server is doing the icecast/transcoding/shoutcast.)
Server Port: 9000
Mount Path: /listen.ogg
Password: make up a secure password, write it down.
2. Seting Up IceCast
If Icecast is not yet installed on your server, do that now, refer to icecast website or your operating system's packaging system, whether thats pacman, rpm, yum, yast, whatever.
Once installed, open up the icecast.xml configuration file in your favorite text editor. I have removed all commented out sections of mine and posted it here for your reference: Please Note: its better to compare this line by line with yours, instead of copying/pasting, some things like the user in which it runs under or file system paths could be different on your system. The really important parts are in authentication and listen-socket. Make sure to update both of those sections and you should be good to go. Notice that listen-socket is set to port 9000 as we configured traktor above.
<icecast>
<limits>
<clients>1200</clients>
<sources>2</sources>
<threadpool>5</threadpool>
<queue-size>524288</queue-size>
<client-timeout>30</client-timeout>
<header-timeout>15</header-timeout>
<source-timeout>10</source-timeout>
<burst-on-connect>1</burst-on-connect>
<burst-size>65535</burst-size>
</limits>
<authentication>
<source-password>CHANGEME</source-password>
<relay-password>CHANGEME</relay-password>
<admin-user>admin</admin-user>
<admin-password>CHANGEME</admin-password>
</authentication>
<directory>
<yp-url-timeout>15</yp-url-timeout>
<yp-url>http://dir.xiph.org/cgi-bin/yp-cgi</yp-url>
</directory>
<hostname>YOUR.SHOUTCASTDOMAIN.COMt</hostname>
<listen-socket>
<port>9000</port>
</listen-socket>
<fileserve>1</fileserve>
<paths>
<basedir>/var/media</basedir>
<logdir>/logs</logdir>
<webroot>/web</webroot>
<adminroot>/admin</adminroot>
<alias source="/" dest="/status.xsl"/>
</paths>
<logging>
<accesslog>access.log</accesslog>
<errorlog>error.log</errorlog>
<loglevel>3</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
<logsize>10000</logsize> <!-- Max size of a logfile -->
</logging>
<security>
<chroot>1</chroot>
<changeowner>
<user>icecast</user>
<group>icecast</group>
</changeowner>
</security>
</icecast>
Ok now that that is done, go ahead and fire up icecast.
3. Setting Up Shoudcast.
As with icecast, go download shoutcast and install it. Refer to the included readme for instructions on how to run it. Once you get it unpacked open up sc_serv.conf in your favorite text editor. I have included the needed changes here, and left out everything else. Once again just make these changes do not use this as your entire file.
MaxUser=1200 Password=CHANGEME PortBase=8000 LogFile=sc_serv.log RealTime=1 ScreenLog=1 ShowLastSongs=10 SrcIP=ANY DestIP=ANY Yport=80 NameLookups=0 AutoDumpUsers=0 AutoDumpSourceTime=30 PublicServer=always AllowRelay=Yes AllowPublicRelay=Yes
Notice that the port base here is listed as 8000.
4. Setting Up StreamTranscoder to pull from IceCast and Send To Shoutcast.
You can download it here. Once you get it installed, find the following settings in its configuration file and edit appropriately. What we are telling it is to download the stream from our icecast server on localhost at port 9000, then transcode it at 96kbps and send it to shoutcast on localhost port 8000.
SourceURL=http://127.0.0.1:9000/listen.ogg Server=localhost Port=8000 ServerPassword=CHANGEME ServerPublic=1 ServerIRC=CHANGEME ServerAIM=CHANGEME ServerICQ=CHANGEME ServerStreamURL=http://YOUR.SHOUTCASTDOMAIN.COM ServerDescription=My Awesome Station ServerGenre=Experiemental ServerMountpoint=/listen.pls AutomaticReconnect=1 AutomaticReconnectSecs=10 Encode=LAME BitrateNominal=96 BitrateMin=96 BitrateMax=96 ServerType=Shoutcast
Thats it! All you need to do now, is start in the following order, shoutcast, icecast, streamtranscoder, then traktor. Once in Traktor click broadcast and watch the icecast log to make sure it connects. If there is a problem the broadcasting icon will blink instead of go solid.
If you run into any hiccups, make sure that your passwords match in all config files, and make sure that port 8000, and 9000 are open to your server. You can always hit port 9000 in a web browser to see icecast status (and admin) , port 8000 to see shoutcast status (and admin).
Happy Streaming!
Comments:
| No Comments Posted |
Add Comment:
Back
