Broadcasting to a shoutcast server: Solved

Discussion in 'TRAKTOR PRO / TRAKTOR SCRATCH PRO' started by constantG, Aug 19, 2009.

Thread Status:
Not open for further replies.
  1. constantG

    constantG New Member

    Messages:
    15
    I have been trying to figure this out (on and off) for about 6 months now and using the help from these forums, shoutcast, edcast and my own radio station admins I beleive I have cracked it. I'm writing this guide because through my searches on the above mentioned forums I have yet to find a complete and final guide that was entirely useful.

    Firstly, I think it needs to be said that, as many of you will agree this would be a hell of a lot easier if NI had native MP3 support or each of our radio servers were to have native OGG support. However, as that isn't possible at this time, here goes.

    I have managed to do this using 1 PC using Win Vista 32 Service pack 1 and 1 connection to the internet, plus a friends PC to listen to the live stream.

    The overheads that all the programs use are not as excessive as have been suggested by some forum members. However I am only relaying my stream to a main server on the internet (there is only one connection directly to my PC). If you are likely to have more than 2 or 3 tuned directly to your local server, I would recommend setting up a second PC which runs the streamtranscoder separately.

    You will need the following to make up your local server:

    1. Traktor (version does not make a difference, but I am using Pro 1.0.2)
    2. Icecast latest version available here
    3. Streamtranscoder latest version available here
    4. Port 8002 forwarded from your router. Go here for details.
    5. Lame_enc.dll must be saved to your Streamtrasncoder program folder it can be downloaded here

    You will need the following to set up and listen to your radio as heard online:

    1. A radio station to be able to connect to. (If you haven't got one yet, now's the time)
    2. A media player capable of playing the radio (i.e. Winamp)
    3. Another PC to listen and for testing.

    So, if you've got all of that available we can start.

    To set up Traktor

    1. Go to Preferences/Broadcasting
    2. Select Use direct connection (no proxy)
    3. Type localhost in Address and 8002 in Port
    4. Type /stream.ogg in Mount path and hackme in Password
    5. Select Ogg Vorbis, 44100 Hz, 192 kBit/s in Format (Don't worry if this is not the bitrate that your online server works at as this is purely the bitrate between Traktor, Icecast and Streamtranscoder)

    To set up Icecast

    1. Open the Configuration file and overwrite with this:

    Code:
    <icecast>
        <limits>
            <clients>100</clients>
            <sources>5</sources>
            <threadpool>5</threadpool>
            <queue-size>524288</queue-size>
            <client-timeout>30</client-timeout>
            <header-timeout>15</header-timeout>
            <source-timeout>10</source-timeout>
            <!-- If enabled, this will provide a burst of data when a client 
                 first connects, thereby significantly reducing the startup 
                 time for listeners that do substantial buffering. However,
                 it also significantly increases latency between the source
                 client and listening client.  For low-latency setups, you
                 might want to disable this. -->
            <burst-on-connect>1</burst-on-connect>
            <!-- same as burst-on-connect, but this allows for being more
                 specific on how much to burst. Most people won't need to
                 change from the default 64k. Applies to all mountpoints  -->
            <burst-size>65535</burst-size>
        </limits>
    
        <authentication>
            <!-- Sources log in with username 'source' -->
            <source-password>hackme</source-password>
            <!-- Relays log in username 'relay' -->
            <relay-password>hackme</relay-password>
    
            <!-- Admin logs in with the username given below -->
            <admin-user>admin</admin-user>
            <admin-password>hackme</admin-password>
        </authentication>
    
        <!-- Uncomment this if you want directory listings -->
        <!--
        <directory>
            <yp-url-timeout>15</yp-url-timeout>
            <yp-url>http://dir.xiph.org/cgi-bin/yp-cgi</yp-url>
        </directory>
        <directory>
            <yp-url-timeout>15</yp-url-timeout>
            <yp-url>http://www.oddsock.org/cgi-bin/yp-cgi</yp-url>
        </directory>
         -->
    
        <!-- This is the hostname other people will use to connect to your server.
        It affects mainly the urls generated by Icecast for playlists and yp
        listings. -->
        <hostname>localhost</hostname>
    
        <!-- You can use these two if you only want a single listener -->
        <!--<port>8000</port> -->
        <!--<bind-address>127.0.0.1</bind-address>-->
    
        <!-- You may have multiple <listener> elements -->
        <listen-socket>
            <port>8002</port>
            <!-- <bind-address>127.0.0.1</bind-address> -->
        </listen-socket>
        <!--
        <listen-socket>
            <port>8001</port>
        </listen-socket>
        -->
    
        <!--<master-server>127.0.0.1</master-server>-->
        <!--<master-server-port>8001</master-server-port>-->
        <!--<master-update-interval>120</master-update-interval>-->
        <!--<master-password>hackme</master-password>-->
    
        <!-- setting this makes all relays on-demand unless overridden, this is
             useful for master relays which do not have <relay> definitions here.
             The default is 0 -->
        <!--<relays-on-demand>1</relays-on-demand>-->
    
        
        <relay>
            <server>127.0.0.1</server>
            <port>8001</port>
            <mount>/stream.ogg</mount>
            <local-mount>/different.ogg</local-mount>
            <on-demand>0</on-demand>
    
            <relay-shoutcast-metadata>0</relay-shoutcast-metadata>
        </relay>
        
    
        <!-- Only define a <mount> section if you want to use advanced options,
             like alternative usernames or passwords
        <mount>
            <mount-name>/example-complex.ogg</mount-name>
    
            <username>othersource</username>
            <password>hackmemore</password>
    
            <max-listeners>1</max-listeners>
            <dump-file>/tmp/dump-example1.ogg</dump-file>
            <burst-size>65536</burst-size>
            <fallback-mount>/example2.ogg</fallback-mount>
            <fallback-override>1</fallback-override>
            <fallback-when-full>1</fallback-when-full>
            <intro>/example_intro.ogg</intro>
            <hidden>1</hidden>
            <no-yp>1</no-yp>
            <authentication type="htpasswd">
                    <option name="filename" value="myauth"/>
                    <option name="allow_duplicate_users" value="0"/>
            </authentication>
            <on-connect>/home/icecast/bin/stream-start</on-connect>
            <on-disconnect>/home/icecast/bin/stream-stop</on-disconnect>
        </mount>
    
        <mount>
            <mount-name>/auth_example.ogg</mount-name>
            <authentication type="url">
                <option name="mount_add"       value="http://myauthserver.net/notify_mount.php"/>
                <option name="mount_remove"    value="http://myauthserver.net/notify_mount.php"/>
                <option name="listener_add"    value="http://myauthserver.net/notify_listener.php"/>
                <option name="listener_remove" value="http://myauthserver.net/notify_listener.php"/>
            </authentication>
        </mount>
    
        -->
    
        <fileserve>1</fileserve>
    
        <!-- set the mountpoint for a shoutcast source to use, the default if not
             specified is /stream but you can change it here if an alternative is
             wanted or an extension is required
        <shoutcast-mount>/live.nsv</shoutcast-mount>
        -->
    
        <paths>
    		<!-- basedir is only used if chroot is enabled -->
            <basedir>./</basedir>
    
            <!-- Note that if <chroot> is turned on below, these paths must both
                 be relative to the new root, not the original root -->
            <logdir>./logs</logdir>
            <webroot>./web</webroot>
            <adminroot>./admin</adminroot>
            <!-- <pidfile>./icecast.pid</pidfile> -->
    
            <!-- Aliases: treat requests for 'source' path as being for 'dest' path
                 May be made specific to a port or bound address using the "port"
                 and "bind-address" attributes.
              -->
            <!--
            <alias source="/foo" dest="/bar"/>
              -->
            <!-- Aliases: can also be used for simple redirections as well,
                 this example will redirect all requests for http://server:port/ to
                 the status page
              -->
            <alias source="/" dest="/status.xsl"/>
        </paths>
    
        <logging>
            <accesslog>access.log</accesslog>
            <errorlog>error.log</errorlog>
            <!-- <playlistlog>playlist.log</playlistlog> -->
          	<loglevel>4</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
          	<logsize>10000</logsize> <!-- Max size of a logfile -->
            <!-- If logarchive is enabled (1), then when logsize is reached
                 the logfile will be moved to [error|access|playlist].log.DATESTAMP,
                 otherwise it will be moved to [error|access|playlist].log.old.
                 Default is non-archive mode (i.e. overwrite)
            -->
            <!-- <logarchive>1</logarchive> -->
        </logging>
    
        <security>
            <chroot>0</chroot>
            <!--
            <changeowner>
                <user>nobody</user>
                <group>nogroup</group>
            </changeowner>
            -->
        </security>
    </icecast>
    There is a lot of info in this file that is not used by myself and I dont fully understand all of it, however I have left it in as some of you will possibly require it.

    Part 2 to follow:
     
  2. constantG

    constantG New Member

    Messages:
    15
    Part 2

    To set up Streamtranscoder

    This is the only part of the local set up that actually streams to the internet so some of the settings in the config file will be different for all of you, so here goes.

    1. Double click Ready to connect to open the config file for the SOURCE connection (i.e. your Icecast Server which you just set up).
    2. Overwrite the file with this:
    Code:
    AutomaticReconnectSecs=5
    AutoConnect=0
    # Log Level 1 = LOG_ERROR, 2 = LOG_ERROR+LOG_INFO, 3 = LOG_ERROR+LOG_INFO+LOG_DEBUG
    LogLevel=2
    # Log File
    LogFile=streamTranscoder_1
    # The source URL for the broadcast. It must be in the form http://server:port/mountpoint.  For those servers without a mountpoint (Shoutcast) use http://server:port.
    SourceURL=http://localhost:8002/stream.ogg
    # Number of encoders to use
    NumEncoders=1
    
    Close and save it.
    3. Select 1 in Num Encoders
    4. A new line under encoder status should appear which says Disconnected and localhost:8000/stream.ogg Vorbis: Quality 0/Stereo/44100, double click this and paste the following into the config file.

    Code:
    # Destination server details (to where you are encoding).  Valid server types : Shoutcast, Icecast, Icecast2
    ServerType=Shoutcast
    Server=[U][I]This needs to be in the format [/I][B]http://my online radio server.org[/B] [I]or somthing similar[/I][/U]
    Port=[U]This is the port which is needed to connect to your online server, in my case it's [B]8000[/B][/U]
    ServerPassword=[U]This is the password needed to connect to the online server (not hackme as used before)[/U]
    ServerMountpoint=
    
    # YP (Stream Directory) Settings [U]Set these items to your desire[/U]
    ServerPublic=1
    ServerIRC=
    ServerAIM=
    ServerICQ=
    ServerStreamURL=
    ServerName=
    ServerDescription=
    ServerGenre=Tech House
    AutomaticReconnectSecs=0
    AutoConnect=0
    
    # Output codec selection (Valid selections : MP3, OggVorbis, Ogg FLAC, AAC, AAC Plus)
    Encode=MP3
    # General settings (non-codec related).  Note : NumberChannels = 1 for MONO, 2 for STEREO.  [U]These settings must match up with your online servers recommendations[/U]
    BitrateNominal=192
    BitrateMin=192
    BitrateMax=192
    NumberChannels=2
    Samplerate=44100
    # Ogg Vorbis specific settings.  Note: Valid settings for BitrateQuality flag are (Quality, Bitrate Management)
    OggQuality=0
    OggBitrateQualityFlag=Quality
    # LAME specific settings.  Note: Setting the low/highpass freq to 0 will disable them.
    LameCBRFlag=1
    LameQuality=1
    LameCopywrite=0
    LameOriginal=0
    LameStrictISO=0
    LameDisableReservior=0
    LameVBRMode=vbr_abr
    LameLowpassfreq=0
    LameHighpassfreq=0
    LAMEPreset=-1
    # AAC (FAAC) specific settings.
    AACQuality=100
    AACCutoff=
    # Save directory for archive streams
    SaveDirectory=C:\Users\Admin\Documents\Streams\Streamtranscoder
    # Flag which indicates if we are saving archives
    SaveDirectoryFlag=1
    # Log Level 1 = LOG_ERROR, 2 = LOG_ERROR+LOG_INFO, 3 = LOG_ERROR+LOG_INFO+LOG_DEBUG
    LogLevel=3
    # Log File
    LogFile=C:\Users\Admin\Documents\Logs\streamTranscoder_1
    # Save Archives in WAV format
    SaveAsWAV=1
    # LAME Joint Stereo Flag
    LAMEJointStereo=1
    
    Edit all of the underlined parts of the file to your needs.

    Close and save the file.

    Now to test it all

    1. Start Icecast and click Start Server Note the server status as Running (Green)
    2. Start Traktor and hit the Broadcast button in the recorder panel.
    3. In a couple of moments the Icecast server should have Source Client Connections 1
    4. Start Streamtranscoder and click Connect If everything is ok it should say Connected twice in the main window.

    Test your online server

    If you have done everything correctly and have connected to your online server go to another PC or ask someone you know online to do the following:

    1. Open Winamp and select Open URL
    2. Type http://your online server:your online port number
    e.g. http://constantg.radio.org:8000
    3. Ask them how it sounds.

    :D
     
  3. FntX

    FntX New Member

    Messages:
    6
    There were concerns about broadcasting and voice-over functionality.
    I will now point that out in addition to this great tutorial.

    The basic setup or idea is:
    1) Broadcast to an Icecast server, best practice here: a 2nd PC or even VM!
    2) Fetch the stream with Winamp
    3) Forward the stream and your voice using jetCast to the real target radio station

    Tech-behind:
    The basic idea requires to broadcast with Traktor to an Icecast server, say port 8000. After that we will fetch the stream using Winamp and then forward this stream using jetCast to the Icecast server again, port 8005. Now the streamtranscoder fetches the 8005 stream and forwards it to an shoutcast server or whatever you like.
    Why jetcast?
    As i searched around the net i found that this is the only plug in which also works with PCs with only one sound card or external audio device.

    Ok here we go:

    NOTE: The ports provided here are not strict so you may use whatever port base you want. Important is that when running all of these on the same PC, Icecast #1 has a different port than Icecast #2 and Shoutcast target station! All of those need a unique port base!

    Basic setup used in this How-To:
    -Icecast #1 receives on port 8000 and sits on my server
    -Icecast #2 receives on port 8005 and sits on my laptop
    -Winamp listens to Icecast #2
    -Jetcast broadcasts to Icecast #1
    -Traktor runs on my desktop and broacasts to Icecast #2
    -Streamtranscoder sits on my server and broadcasts to shoutcast on port 8005

    1) You need to download the JetCast plug in for Winamp and of course, Winamp itself if not already installed.
    2)Set up Icecast #2 on the 2nd PC (this may be a VM) This will be the "Traktor-Receiver" so in this example, we will use port base 8005.
    3) Icecast #1 is configured to receive on port base 8000
    4) Now simply run Winamp and select the JETCast Plugin from the Plugins->DSP section
    5) Configure it like this:
    GENERAL:
    Tick "When microphone is turned on, the following device will be selected and used"
    ...and then select the microphone input device from the dropdown list below and also the actual Microphone input.

    LANGUAGE:
    Self explanatory...

    FORMAT:
    Select "Use OGG-VORBIS as streaming format"
    You may now configure it to whatever you need by clicking on "Config..."

    STATION:
    Comes in handy if you want to provide a radio station on a LAN

    DISC JOCKEY
    You should know what to put in there ;)

    Time Schedule
    Skip!​

    Private
    ..again, skip​

    Metadata
    Okay -- here you gonna put in your Metadata. HINT: If you wanna hide the track title and artist completely, don't use the %t token ;)

    SERVER:
    -Click on "Config..."
    -Tick "Use external servers"
    -Select "Icecast 2.x server"
    -Enter the mountpount (for example "/listen.ogg")
    -Set up the Hostname/ip and password
    -In this example I used port 8000 because my target, Icecast #1, runs on port 8000

    Directory Server
    This is handled by the target Icecast/Shoutcast server. You should uncheck both options...​

    The last thing to do is to tell Traktor where it should connect to. In this example its the Icecast #2.

    Setup is complete.

    To start moderated broadcasting you'll need to:
    -Start all server apps like Both icecasts, the Shoutcast and streamtranscoder
    -Start Winamp
    -Start Traktor Broadcasting
    -Open the Icecast #2 stream in Winamp
    -Click the Broadcast button on the jetCast plugin Window (the left button).

    If you wanna talk something, hit the button in the middle.
    If the voice is not loud enough, pull the slider to the right.


    Hope it helps ;)
     
  4. constantG

    constantG New Member

    Messages:
    15
    You are totally correct. It is imperative that you install Streamtranscoder on a separate computer. Also it's worth noting that since writing this I have found that it's a good idea to set

    <burst-on-connect>1</burst-on-connect>

    on the Icecast.cfg file to

    0 and not 1.

    I don't know why but it makes a difference.

    :)
     
  5. FntX

    FntX New Member

    Messages:
    6
    Which problem (if there is any) addresses this?
     
  6. constantG

    constantG New Member

    Messages:
    15
    Just ignore my last post. The Burst on connect change did nothing.

    :)
     
  7. FntX

    FntX New Member

    Messages:
    6
    Okay *drop*
    =)
     
  8. Lukabm

    Lukabm New Member

    Messages:
    7
    so you need two laptops now? and also... im new to icecast and this whole broadcasting thing :) ans I wanna know, If I go to icecast server where would I broadcast my steam, say like in shoutcast you can look up for your station in their directory...

    Does Icecast have such thing?

    thanks
    ---
    Traktor-> Icecast->URL / Winamp->Shoutcast = Broadcast ? anyone tried this set up? ;)
     
  9. romeo.deepmind

    romeo.deepmind NI Product Owner

    Messages:
    7
  10. Lukabm

    Lukabm New Member

    Messages:
    7
    Guys Im having trouble linking up Icecast to my Traktor I have:
    Both Icecast and Traktor, I have port forwared my router: starting port 8000 ending port 8001, I have set up static IP address, so that the Ip address stays the same.

    Im running Icecast and the Traktor on same machine - I cant tried everything but i cant get them two to link up -

    this is my Icecast configuration:

    <!-- This config file contains a minimal set of configurable parameters,
    and mostly just contains the things you need to change. We created
    this for those who got scared away from the rather large and heavily
    commented icecast.xml.dist file. -->
    <icecast>
    <limits>
    <sources>2</sources>
    </limits>
    <authentication>
    <source-password>110185</source-password>
    <relay-password>londoner</relay-password>
    <admin-user>admin</admin-user>
    <admin-password>londoner</admin-password>
    </authentication>

    <hostname>localhost</hostname>
    <listen-socket>
    <port>8000</port>
    </listen-socket>
    <fileserve>1</fileserve>
    <paths>
    <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 -->
    </logging>
    </icecast>

    can anyone help out? tell me what im doing wrong.. the ip address im using in traktor is 192.168.1.30 start the icecast clivk on broadcast in traktor but it keeps flashing :(

    thanks in advance
    ---
    update: port forvarding was set up for shoutcast, using 2 ports, where's icecast using just one changed it to 1 port connected and live ;) all sorted
     
  11. romeo.deepmind

    romeo.deepmind NI Product Owner

    Messages:
    7
    for icecast you need only one port - this is 8000 in your case.

    first of all when you start icecast go to http://127.0.0.1:8000/ in your brower and make shure icecast is started up (you will see icecast info page)

    the second part is to set up broadcasting in traktor. if you run both traktor and icecast on same machine you can enter the following settings

    address: localhost (or 127.0.0.1 try both of them)
    port: 8000
    mount path: lukabm.ogg (but you can enter different name without spaces and it must end on .ogg)
    password: 110185 (in your case. you can set up it using <source-password>110185</source-password> property in the config)
    format: anything you like, but i offer you not to use more than 44100/96kbps on low bandwidth (less than 1 Mbit)

    fill other fields as you like

    now you can start broadcast. everything must be ok.

    in order to make shure that you are broadcasting navigate to http://127.0.0.1:8000/ in your browser again. there you'll see your mount point (in your case it will be lukabm.ogg). click on M3U link on the right side of mount point name. you will be prompted to open or save it to your computer. choose open (better using winamp). that's all! now you can hear your stream.

    in order to share your broadcast with another people you must give them link to it in the following format http://<your_external_ip>:8000/lukabm.ogg

    they must add this link in their players and listen to you =)
    ---
    note that if you make changes in config you must restart icecast application. so don't forget to do it =)
     
  12. constantG

    constantG New Member

    Messages:
    15
    You don't necessarily need 2 computers

    Ok, I've been dj'ing on my setup for a while now and I have it all working on 1 PC. The problems I had initially were that it was terrible sound quality at the listeners' end of the set up.

    All I did to get round this problem was to drop the "record" level in Traktor. Works really well and there are no dropouts, clicks or buffering.

    So to summarise what I have done to get Traktor streaming to an MP3 server, with metadata is :

    Traktor broadcasting on 127.0.0.1 port 8002
    Icecast picking it up and re-broadcasting on 127.0.0.1 port 8002
    Streamtranscoder picking that up transcoding the OGG to MP3 and broadcasting to my online radio server.

    That's it in a nutshell, I haven't had to change anything in the config files that I posted earlier, so that should all still work.

    The beauty of using these two programs is that you don't have to mess around with winamp/shoutcast dsp and therefore you don't need to mute any volume sliders, or change dsp settings each time you want to connect.

    :)
     
  13. johnny a

    johnny a Forum Member

    Messages:
    148
    Can You Use Media Player Instead Or Does It Have To Be Winamp, Thanks!
     
  14. Lukabm

    Lukabm New Member

    Messages:
    7
    you can use media player to listen to your feed, but to broadcast u'll need Winamp
     
  15. FntX

    FntX New Member

    Messages:
    6
    Another note:

    It is possible to send your voice directly to shoutcast using JetCast. You need to install the ACM version of LAME to enable MP3 Quality higher than 48kbit.

    NOTE: Running JetCast on Win7 and trying to encode using MP3 is a pain since it doesn't recognize the LAME ACM, therefore no luck to get more than 48kbit



    I'm still searching for an App that enables voice-over and then uploads the whole thing to shoutcast servers.

    JetCast is no longer an option.

    Does SAM has the functionality of "listening" to a Icecast stream, voice-over and then broadcast this to shoutcast?
     
  16. John L

    John L New Member

    Messages:
    13
    Ok really how lame is this. If Virtual DJ can have shoutcast support why not Traktor. I guess I am leaning toward VDJ, I need shoutcast not this work around stuff. It can not be that difficult
     
  17. FntX

    FntX New Member

    Messages:
    6
    We're asking for this for Years so i Hope they will include this Feature soon. It can't Be that hard since icecast Shares the Same Protocol Architecture
     
  18. DeVon33610

    DeVon33610 New Member

    Messages:
    1
    I still don't see why the pc doesn't have the mac equivalent of Nicecast. I went through this whole spill untill i actually looked in the settings of Nicecast lol. But Nicecast has some way of taking over the programs audio streams unlike anything the PC has and is able to stream in icecast1,2, shoutcast, and live365. So its beyond me why that company or anyone else for that matter has made the easy to use equivalent. I mean its 40 bucks yea or you can stream for an hour at a time for free. Just have to reset it. But $40 bucks is better then that hassle trying to beat a dead horse. Or NI could just add that natively >.>.
     
  19. Vexel

    Vexel Forum Member

    Messages:
    24
    Only problem with Nicecast is that it doesn't send track information to the station you're broadcasting on. (In Traktor, works fine from iTunes and other software I've tried.)

    I use Traktor and Nicecast 3 nights a week to do a radio show and I'm constantly having to say what the tracks are instead of users checking out the stream info.
     
  20. Mr_Lee

    Mr_Lee New Member

    Messages:
    8
    Hey guys/girls ive managed to get traktor to broadcast to icecast and i am connecting to icecast from another pc, i can connect to the stream and get the metadata(tracknames etc) but no audio..and shows a bitrate of 0 .... ideas? its doing my head in
     
Thread Status:
Not open for further replies.