Traktor plus Icecast plus StreamTranscoder plus Shoutcast

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:

Your Name:
Your E-Mail:
(Not Displayed)
Comment:
Security Code:24f8e0ffdc016180c74653133e4fe7a60e5f3e37
Type Security Code:


Back

Tag cloud

  1. 1 entries are tagged with 2007
  2. 1 entries are tagged with 2008
  3. 1 entries are tagged with 2009
  4. 2 entries are tagged with 2010
  5. 2 entries are tagged with applevalley
  6. 1 entries are tagged with archlinux
  7. 1 entries are tagged with artichoke
  8. 1 entries are tagged with automation
  9. 1 entries are tagged with batcountry
  10. 1 entries are tagged with beats
  11. 1 entries are tagged with bigsur
  12. 3 entries are tagged with bm2009
  13. 8 entries are tagged with burningman
  14. 1 entries are tagged with christmas
  15. 5 entries are tagged with code
  16. 1 entries are tagged with cplusplus
  17. 1 entries are tagged with desert
  18. 1 entries are tagged with drinks
  19. 1 entries are tagged with dspam
  20. 2 entries are tagged with dunes
  21. 1 entries are tagged with energy
  22. 1 entries are tagged with esplanade
  23. 5 entries are tagged with europe
  24. 1 entries are tagged with evdo
  25. 2 entries are tagged with flv
  26. 1 entries are tagged with gadgets
  27. 1 entries are tagged with government
  28. 1 entries are tagged with haiku
  29. 1 entries are tagged with icecast
  30. 1 entries are tagged with internetradio
  31. 1 entries are tagged with iphone
  32. 2 entries are tagged with losangeles
  33. 1 entries are tagged with math
  34. 3 entries are tagged with mix
  35. 1 entries are tagged with motivation
  36. 1 entries are tagged with moving
  37. 3 entries are tagged with music
  38. 1 entries are tagged with newserver
  39. 1 entries are tagged with obama
  40. 1 entries are tagged with oil
  41. 1 entries are tagged with productivity
  42. 1 entries are tagged with radio
  43. 1 entries are tagged with rails
  44. 3 entries are tagged with recipe
  45. 1 entries are tagged with redmine
  46. 2 entries are tagged with reflections
  47. 1 entries are tagged with rmine
  48. 8 entries are tagged with ruby
  49. 1 entries are tagged with salmon
  50. 1 entries are tagged with salsa
  51. 1 entries are tagged with shoutcast
  52. 3 entries are tagged with site
  53. 2 entries are tagged with snow
  54. 1 entries are tagged with spill
  55. 1 entries are tagged with spotmanradio
  56. 1 entries are tagged with streamtranscoder
  57. 1 entries are tagged with summer
  58. 1 entries are tagged with tecate
  59. 1 entries are tagged with thanksgiving
  60. 6 entries are tagged with travel
  61. 1 entries are tagged with trip
  62. 1 entries are tagged with turkey
  63. 3 entries are tagged with twitter
  64. 1 entries are tagged with website
  65. 3 entries are tagged with work
  66. 1 entries are tagged with x4200
  67. 3 entries are tagged with yz250

Twitter Updates

Links to check out

Subscribe RSS