• How to re-stream audio from SHOUTcast/Icecast

    This tutorial provides the basic steps that show how to use Wowza Streaming Engine™ software to re-stream SHOUTcast or Icecast streams for playback on all supported player technologies.

    Note: Microsoft Silverlight doesn't support audio-only Smooth Streaming.

    Contents


    Tutorial

    Troubleshooting

    Related Articles

    Tutorial


    This tutorial shows you how to set up an application that re-streams SHOUTcast or Icecast streams. Wowza Streaming Engine software administrators can configure live streaming applications by using UI options in Wowza Streaming Engine Manager or by setting properties in Application.xml. Both configuration methods have the same result. Wowza Media Server® software administrators must configure live streaming applications in the Application.xml file.

    Wowza Streaming Engine Manager configuration

    This section shows you how to set up a live streaming application in Wowza Streaming Engine Manager. Users play the live stream to listen to the event as it happens. The example uses an application named live, which is included in default Wowza Streaming Engine software installations. If you want to create a new live streaming application, you can use this same procedure.

    You can use Streaming Engine Manager with the latest versions of most web browsers that support HTML5 and Cascading Style Sheets level 3 (CSS 3). We recommend the Google Chrome browser.

    1. Make sure Wowza Streaming Engine Manager is running. See How to start and stop Wowza Streaming Engine software.

    2. On the Streaming Engine Manager Welcome page, click the Applications tab at the top of the page.

    3. Configure the live application:

      1. In the Applications contents pane, click live, and then click Edit. (This example uses the installed live application. If you want to create a new live streaming application, click Add Application in the contents pane, and then click Live. Follow the instructions in the UI.)


      2. On the live page, select all of the Playback Types except Microsoft Smooth Streaming, and then click Save. (Microsoft Silverlight doesn't support audio-only Smooth Streaming.)



      3. The following alert appears after every configuration change. You can wait until all changes are completed before you restart.


    4. Configure outgoing (playback) authentication:

      1. In the contents pane, click Outgoing Security, and then click Edit.


      2. On the Outgoing Security page, select No client restrictions, and then click Save.

    5. Restart the application.


    The application runs whenever Streaming Engine software is running.

    Publishing the stream

    This section provides the basic steps for creating a .stream file to publish your stream to the Streaming Engine software.

    1. Create the .stream file:

      1. In the Server contents pane, click Stream Files, and then click Add Stream File.



        Note: You can also start the procedure to create a .stream file in the Applications contents pane for the live application.
      2. In the Add Stream File dialog box, enter a name for the new stream file, enter Stream URI, and then click Add.



        The URL that you use to connect to a SHOUTcast or Icecast server is one of the URLs that's contained in a SHOUTcast playlist (.pls) file or Icecast (.m3u) playlist file. Most websites that publish SHOUTcast or Icecast streams have links that reference these files. To re-stream a SHOUTcast or Icecast stream, you must first download one of the playlist files to your local computer and then use one of the links found inside to connect to the published stream. Enter this link value in Stream URI.

    2. Start the stream:

      1. In the Server contents pane, click Stream Files, and then click the Connect icon for the stream file you created in step 1.



      2. In the Connect a Stream File dialog box, select live in Application Name and shoutcast in MediaCaster Type, and then click OK.



      3. The Connection successful notification is displayed.


    XML configuration

    Note: If you created your application by following the previous section, skip this section. If you make changes to Application.xml and you're using the Wowza Streaming Engine™ software, any supported settings will be displayed in the manager the next time it's started. Wowza Media Server® software doesn't support Wowza Streaming Engine Manager, so you must edit Application.xml in a text editor if you're running Wowza Media Server.
    1. Create application folder [install-dir]/applications/live.

    2. Create configuration folder [install-dir]/conf/live and copy [install-dir]/conf/Application.xml to this new folder.

    3. Edit the newly copied Application.xml file and make the following changes (some of these settings may already be present):

      1. Set the Streams/StreamType property to:
        Code:
        <StreamType>live</StreamType>
      2. Set the HTTPStreamers property to:
        Code:
        <HTTPStreamers>cupertinostreaming, sanjosestreaming, mpegdashstreaming</HTTPStreamers>
      3. Set the Streams/LiveStreamPacketizers property to:
        Code:
        <LiveStreamPacketizers>cupertinostreamingpacketizer, sanjosestreamingpacketizer, mpegdashstreamingpacketizer</LiveStreamPacketizers>
      4. Set the RTP/Authentication/PlayMethod to:
        Code:
        <PlayMethod>none</PlayMethod>

    4. Restart the Wowza server.

    Publishing the stream

    Note: If you're using Wowza Streaming Engine, you can publish the stream in Streaming Engine Manager.
    1. Use a text editor to create the file [install-dir]/content/radiostation.stream and set the contents of this file to the full HTTP URL of a SHOUTcast or Icecast stream (see URL to connect to SHOUTcast or Icecast).

    2. Using a text editor, edit the file [install-dir]/conf/admin.password and add a user name and password that will be used to start and stop publishing of the radio station. The following is an example of the file with user name myUser and password myPassword:
      Code:
      # Admin password file (format [username][space][password])
      # username password
      myUser myPassword
    3. Start the Wowza server.

    4. Use Stream Manager to start the stream:

      1. Enter the following URL in a web browser :
        URL: http://[wowza-ip-address]:8086/streammanager

      2. In the Security dialog box, enter your admin user name and password from step 2.

      3. In the Stream Manager webpage, click the [start-receiving-stream] link just below the live application folder.

      4. In the Start Receiving Stream dialog box, select the following MediaCaster Type option: shoutcast

      5. In the Stream Name field, enter radiostation.stream.

      6. Click OK.

    Playback

    Note: In the following examples, [wowza-ip-address] is the IP address or domain name of the Wowza server.

    Wowza Streaming Engine Manager

    In Streaming Engine Manager, click Test Players in the upper-right corner of the live application page. The Test Players window that opens includes test players that are preconfigured to stream the live stream named myStream over various streaming formats.

    Each tab in the Test Players window either hosts a test player that you can use to play the live stream or provides instructions for playing the live stream. For example, to use the Adobe HDS protocol to play radiostation.stream, click the Adobe HDS tab, enter the information below, and then click Start.

    • Server: Enter [wowza-ip-address]:1935.

    • Application: Enter live.

    • Stream: Enter radiostation.stream.


    The result when using the Adobe HDS tab on the player is the following URL:

    http://[wowza-ip-address]:1935/live/radiostation.stream/manifest.f4m

    The test players are also online at www.wowza.com/testplayers.

    Example players

    You can also use example players installed in [install-dir]/examples/ to test your streaming applications. For more information see the following articles:


    Troubleshooting


    URL to connect to SHOUTcast or Icecast

    The URL that you use to connect to a SHOUTcast or Icecast server is one of the URLs that's contained in a SHOUTcast playlist (.pls) file or Icecast playlist (.m3u) file. Most websites that publish SHOUTcast or Icecast streams have links that reference these files. To re-stream a SHOUTcast or Icecast stream, you must first download one of the playlist files to your local computer and then use one of the links found inside to connect to the published stream.

    RTSP/RTP

    RTSP/RTP streaming is used to stream to Android and BlackBerry mobile devices. Android mobile devices formerly supported Adobe Flash player, but Android no longer supports Flash. Newer Android devices now support Apple HLS. HLS works best on Android 4.0 devices and above.

    To stream to RTSP/RTP, be sure that UDP ports 0-65535 are open and properly mapped to the server that's running the Wowza server software.

    Note: To configure the Wowza server properly for RTSP/RTP streaming, carefully follow the instructions provided in How to troubleshoot RTSP/RTP playback.

    Common problems with .stream files


    Many text editors will append a .txt file name extension to the radiostation.stream file name. This will result in an error message similar to the following:

    SDP file missing: c:/program files/wowza media systems/wowza streaming engine [version]/content/radiostation.stream

    To fix this, go to the [install-dir]/content folder and remove the .txt file name extension from the file.

    Property to change AAC packetization method

    A Wowza server can use the mpeg4-generic and mp4a-latm (3gpp) packetization methods to output AAC audio. The default packetization method is mpeg4-generic.

    Wowza Streaming Engine Manager configuration


    To switch to mp4a-latm (3gpp), do the following:

    1. In the Streaming Engine Manager contents pane, click live.

    2. On the live application page Properties tab, click Custom in the Quick Links bar or scroll to the bottom of the page.

      Note: Access to the Properties tab is limited to administrators with advanced permissions. For more information, see Manage credentials.
    3. In the Custom area, click Edit.

    4. Click Add Custom Property, and then do the following:

      1. Add the audioPacketizerAAC property with the following values:

        • Path: Select /Root/Application/RTP.

        • Name: Enter audioPacketizerAAC.

        • Type: Select String.

        • Value: Enter com.wowza.wms.rtp.packetizer.RTPPacketizerMPEG4LATM.

      2. Click Add.

    5. On the Properties tab, click Save.

    6. Click Restart in the upper-right corner of the live application page to restart the application.

    XML configuration


    To switch to mp4a-latm (3gpp), add the following property to the RTP/Properties container in [install-dir]/[application]/Application.xml (be sure to use the correct Properties container—there are several in the Application.xml file):
    Code:
    <Property>
        <Name>audioPacketizerAAC</Name>
        <Value>com.wowza.wms.rtp.packetizer.RTPPacketizerMPEG4LATM</Value>
    </Property>

    Updated: For Wowza Streaming Engine 4.0.6 on 08-11-2014

    Comments 42 Comments
    1. svasan -
      How do I get to the stream on android phones?

      The following did NOT work on the Nexus one or Motorola Droid:

      rtsp://[wowza]:1935/live/radiostation.stream

      But the following works fine on iPhone:

      http://&#91;wowza]:1935/live/radiostatio.../playlist.m3u8
    1. rogerlittin -
      You should be able to connect to the stream using the rtsp method on the android.
    1. gabole29 -
      hi
      i have a weird issue: i've been following each step:
      my radiostation.stream file point to http://myicecastserver:8000/live.m3u8
      stream is started from the streammanager

      i can play my stream with vlc using rtsp://mywowzaserver:1935/shoutcast/radiostation.stream but not from rtsp://mywowzaserver:1935/live/radiostation.stream

      and both wont work on my samsung omnia using the embeded streaming player

      also, using the shoutcast example, it works with:

      rtmp://mywowzaserver/shoutcast as server
      http://myicecastserver:8000/live.m3u8 as URL

      but not with

      rtmp://mywowzaserver/live as server
      http://myicecastserver:8000/live.m3u8 as URL

      any clue ?

      thanks !
    1. rogerlittin -
      When you start the stream with the stream manager you need to define which application the stream will start on. Are you starting it on the shoutcast application or the live application?

      The shoutcast application will start it automatically anyway if you connect to it with your rtmp example but the live application need the stream manager to manually start the stream first. The difference between the two is the stream type of the application.
    1. gabole29 -
      in the stream manager i tryed both shoutcast and live, and tryed both as well for app name in the url...and it's working using shoutcast as appname, but live in stream manager ...
    1. rogerlittin -
      It sounds like the stream type for live is not correct.

      When you look in your conf folder do you see a folder for shoutcast and a folder for live. If either one is missing then that one will use the default Application.xml which is conf/Application.xml. If that is the case and you haven't edited it then the stream type will probably be wrong for live streaming.

      The fact that the shoutcast app is working suggests that the live app is probably using the default stream type which is no good for live viewing.

      Create a folder called `live` in the conf folder and copy conf/Application.xml to it.
      Edit conf/live/Application.xml and set Streams/StreamType to live. Also, if you are going to stream to the iPhone or Silverlight then add the appropriate Stream/LiveStreamPacketizers.
      If you are not using passwords for your rtsp connections then you also need to set RTP/Autentication/PlayMethod to none.

      Once you save the file, restart wowza to make sure that the live application stops and then you will need to start radiostation.stream on the live app using the stream manager.
    1. schutzmarke -
      hi all,

      sorry, but this tutorial is quite confusing for me.

      - do i need the shoutcast application to make the live app working?
      - furthermore, there is no MediaCaster Type: "live", do you mean "live-repeat"?

      i tried the live application without doing the shoutcast application. i have to set up a shoutcast repeat to rtsp stream.
      when i do exactly like you show here in the tutorial (i also kicked my "live" application i had before to really do exactly, what is written here), i try to get the stream via vlc and get the error message "nothing to play"

      thx in advance for your help
    1. rrlanham -
      You're right, it should be "shoutcast". This is corrected:

      Select the MediaCaster Type: shoutcast
      Try again with this change. I updated the guide.

      Richard
    1. vijay007 -
      Hello
      i am currently making an iphone App that will stream local radio channels & internet radio channel.
      I followed the example above but it not working from the Safari browser itself.

      I am able to stream live tv which has been configured successfully

      the followowing was used for testing
      radionri.stream contains the following
      http://www.radionri.com/tuner/listen.m3u?id=437

      Any clue why i am not able to stream?

      Thanks
      Vijay
    1. rrlanham -
      Vijay,

      Wowza cannot ingest a segmented stream, which is what this. You can play that stream directly on your iOS device, I tested it. Wowza segments streams for iOS playback, but you cannot send such a stream to Wowza.

      Richard
    1. vijay007 -
      Hello Richard
      (as per tutorial)
      I did a 'save as' on the Radio link which saved to a 'listen.m3u' playlist file. I
      When same file is open with wordpad i got the followings
      #EXTM3U
      #EXTINF:-1,Radio NRI 24/7 - Bollywood Massive
      http://radionri2.lbdns-streamguys.com

      #EXTINF:-1,Radio NRI 24/7 - Bollywood Massive
      http://205.188.215.230:8024

      I copied 'http://205.188.215.230:8024' to a 'radionri.stream' file which i saved to the content directory of Wowza server.

      On streammanager i did load the stream with 'shoutcast'

      I was then able to stream on the iPhone.

      Regards
      Vijay
    1. vijay007 -
      Hello Richard
      i got a radio statio with radio link
      mms://87.255.34.59/r1_mu=live

      Any clue how i can ShoutCast this stream?

      Thanks
      Regards
      Vijay CHANGEA
    1. charlie -
      Wowza does not support MMS at this time. You will need to transcode the stream.

      Charlie
    1. vijay007 -
      Hello Charlie
      Thanks for your support

      Do you have any suggestion for Transcodding on the fly the radio stations to pls / m3u format?

      Kind Regards
      Vijay
    1. CookieWoo -
      Hello,

      1) I've downloaded the above Application.xml file and placed it in the [install-dir]/conf/live/Application.xml dir
      2) Created the dir [install-dir]/applications/live
      3) Created a streaming file with the link to the shoutcast stream in the [install-dir]/content dir and named it stream.192.
      4) Restarted Wowza.

      But each time I connect to http://&#91;wowza-address]:1935/live/str.../playlist.m3u8 the logfile shows:
      HTTPStreamerAdapterCupertinoStreaming.getAppInstance: Stream not found [live/stream.192/playlist.m3u]: stream.192

      What could be the problem?

      Thank you.
    1. rrlanham -
      First, a .stream file is a text file with a .stream extension not a .192 extension. It could be 192.stream

      /content/192.stream

      Make sure the above .stream file is plain text file, does not have a .txt extension (Windows hides known extensions by default) and that it contains the shoutcast url.

      Then, start "192.stream" in StreamManager on the "live" application with MediaCaster type "shoutcast". Now try:

      Code:
      http://[wowza-address]:1935/live/_definst_/192.stream/playlist.m3u8
      One other thing: if the shoutcast stream is MP3, it should be stereo at 44100Hz to work. AAC audio is preferable

      Richard
    1. CookieWoo -
      Richard,

      Thanks for the response.

      It is not on windows, but a linux box.
      Does it really has to end with a .stream extension?
      I mean, if it is another extension it is never gonna work?

      Thanks.
    1. CookieWoo -
      Richard, okay now it works.
      One other thing, is there another way than starting the stream with the streammanager each time Wowza was restarted?
      We have a lot of different streams and I don't want to publish them all by hand everytime the server was restarted.

      Thanks.
    1. rrlanham -
      You can use /conf/StartUpStreams.xml to automate

      Richard
    1. CookieWoo -
      It is also possible to stream this way to non-ipad/ipod clients, like winamp.