• How to re-stream audio from SHOUTcast/Icecast

    This tutorial describes procedures for re-streaming SHOUTcast or Icecast streams through Wowza Streaming Engine™ software. It shows configuration details for an application named live that is used to stream to the Adobe® Flash® Player, Apple® iOS devices, and RTSP/RTP-based players.

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

    Contents



    Tutorial


    Troubleshooting


    Related Articles


    Tutorial




    Configuration in Wowza Streaming Engine Manager


    1. Start Wowza Streaming Engine Manager.

    2. In the Applications contents pane click Stream Files.

    3. Click + Add Stream File.




    4. In the Add Stream File dialog box, enter a name for the stream.

    5. Enter the URI of the stream.


    6. Click + Add.


    Configuration in XML


    This tutorial provides basic steps for setting up an application for live streaming and configuring Application.xml. If you are using Wowza Streaming Engine Manager, skip this section.

    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, smoothstreaming, sanjosestreaming, mpegdashstreaming</HTTPStreamers>
      3. Set the Streams/LiveStreamPacketizers property to:
        Code:
        <LiveStreamPacketizers>cupertinostreamingpacketizer, smoothstreamingpacketizer, 
           sanjosestreamingpacketizer, mpegdashstreamingpacketizer, mpegdashstreamingrepeater 
           </LiveStreamPacketizers>
      4. Set the RTP/Authentication/PlayMethod to:
        Code:
        <PlayMethod>none</PlayMethod>




    Publishing the stream in Wowza Streaming Engine Manager


    1. In the Server contents pane click Startup Streams.

    2. Click + Add Startup Stream.



    3. In the Add to Startup Streams dialog enter Stream Name: radiostation.stream.

    4. Select live for Application Name.

    5. Click the radio button: Connect to default application instance: _definst_.

    6. Select MediaCaster Type: shoutcast.

    7. Click OK.



    8. Restart the server to start the stream each time a new stream is added.






    Publishing the stream in XML


    If you are using Wowza Streaming Engine Manager, skip this section.

    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 [install-dir]/conf/admin.password file and add a username and password that will be used to start and stop publishing of the radio station (below is an example of the file with the username myuser and password mypassword):
      Code:
      # Admin password file (format [username][space][password])
      # username password
      myuser mypassword
    3. Start Wowza Media 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 username and password from above.

      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 in Wowza Streaming Engine Manager



    1. In the Applications contents pane click live.

    2. Click Test Players.




    3. Enter Server and Stream.

    4. Click Start.



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

    Playback in 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:



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

    Adobe Flash Player (RTMP)


    In Wowza Media Server 3.5.0 and later, double-click [install-dir]/examples/SHOUTcast/FlashRTMPPlayer/player.html, enter the information below, and then click the Connect button.

    Server: rtmp://[wowza-ip-address]/live
    Stream: radiostation.stream

    To play the stream from a remote computer, copy the FlashRTMPPlayer folder to a web server, and then connect to: http://<webserver>/FlashRTMPPlayer/player.html.

    Note: In Wowza Media Server 3.1.2 and earlier, double-click [install-dir]/examples/SHOUTcast/client/shoutcast.html, enter the information below, and then click the Play button.

    Server: rtmp://[wowza-ip-address]/live
    Stream: radiostation.stream

    To play the stream from a remote computer, copy the client folder to a web server, and then connect to: http://<webserver>/client/shoutcast.html.

    Note: If your application will only stream to Flash RTMP clients, see Flash RTMP clients only.

    Adobe Flash Player (San Jose/Adobe HDS)


    In Wowza Media Server 3.5.0 and later, double-click [install-dir]/examples/LiveVideoStreaming/FlashHTTPPlayer/player.html, enter the information below, and then click the Connect button.

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

    To play the stream from a remote computer, copy the FlashHTTPPlayer folder to a web server, and then connect to: http://<webserver>/FlashHTTPPlayer/player.html.

    Note: In Wowza Media Server 3.1.2 and earlier, double-click [install-dir]/examples/LiveVideoStreaming/clientOSMF/bin-release/LiveOSMFPlayer.html, enter the information below, and then click the Play button.

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

    To play the stream from a remote computer, copy the clientOSMF/bin-release folder to a web server, and then connect to: http://<webserver>/bin-release/LiveOSMFPlayer.html.

    Note: The stream can only be played from an OSMF-based Flash player that's embedded in a webpage.

    Apple iOS device (Cupertino/Apple HLS)


    Enter the following URL into the Safari® web browser on the device:

    URL: http://[wowza-ip-address]:1935/live/radiostation.stream/playlist.m3u8

    Note: This stream can also be played using the Safari web browser or QuickTime 10.x on a computer running Mac OS® X Snow Leopard version 10.6 and later.

    RTSP/RTP player


    Enter the following URL into the RTSP/RTP player:

    URL: rtsp://[wowza-ip-address]:1935/live/radiostation.stream

    Flash RTMP clients only


    (Optional) If your application will only stream to Flash RTMP clients, in [install-dir]/conf/live/Application.xml, you can set the Streams/StreamType property to:
    Code:
    <StreamType>shoutcast</StreamType>
    If you do this, then you won't need to use StreamManager (see Publishing the stream). The first Flash client that plays the stream will trigger Wowza Media Server to start re-streaming.

    Also, in [install-dir]/conf/live/Application.xml, make sure that the Streams/LiveStreamPacketizers property is empty:
    Code:
    <LiveStreamPacketizers></LiveStreamPacketizers>

    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 is contained in a SHOUTcast playlist (.pls) file or Icecast playlist (.m3u) file. Most websites that publish SHOUTcast or Icecast streams have links on their sites 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 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 running Wowza Media Server.

    • It's very important to carefully follow the instructions provided in How to troubleshoot RTSP/RTP playback to properly configure Wowza Media Server for RTSP/RTP streaming.


    Common problems with .stream files


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

    SDP file missing: c:/program files/wowzamediasystems/wowzastreamingengine[version]/content/radiostation.stream

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

    Property to change AAC packetization method


    Wowza Media Server can output AAC audio using the mpeg4-generic and mp4a-latm (3gpp) packetization methods. The default packetization method is mpeg4-generic. To switch to mp4a-latm (3gpp), add the following property to the RTP/Properties container in [install-dir]/[application]/Application.xml (be sure to get 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.0 on 02-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.