AAC Shoutcast Restream and Adaptive Multiple bitrates

Doh! Nevermind, I had the wrong application specified.

So, for future reference to anyone who needs to setup something like this, use the following:

OSMF Audio Only Player with dynamic stream switching and delivered over http:

	<object width="400" height="125"> <param name="movie" value="StrobeMediaPlayback.swf"></param>
	<param name="flashvars" value="src=http://<wowza server IP>/<application name>/smil:<smil file>.smil/manifest.f4m&poster=images/image.jpg&posterScaleMode=stretch&autoPlay=true&playButtonOverlay=false&controlBarAutoHide=false&verbose=true"></param>
	<param name="allowFullScreen" value="true"></param>
	<param name="allowscriptaccess" value="always"></param>
	<param name="wmode" value="transparent"></param>
	<embed src="StrobeMediaPlayback.swf" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true"  wmode="transparent"  width="400" height="125" flashvars="src=http://<wowza server IP>/<application name>/smil:<smil file>.smil/manifest.f4m&poster=images/image.jpg&posterScaleMode=stretch&autoPlay=true&playButtonOverlay=false&enableStageVideo=false&controlBarAutoHide=false&backgroundColor=FF0000&verbose=true&urlIncludesFMSApplicationInstance=true"></embed>
	</object>

Flowplayer Audio Only Player with dynamic stream switching and delivered over http:

 
 
 
 
<!doctype html>
<html>
<head>
    
    <title>Bandwidth detection for HTTP Streaming : Flowplayer</title>
 
    <link rel="shortcut icon" href="/media/favicon.png">
    <!-- standalone page styling. can be removed -->
    <style>
        body{
            width:400px;
            margin:50px auto;
            font-family:sans-serif;
        }
        a:active {
            outline:none;
        }
        :focus { -moz-outline-style:none; }
 
        .palert {
            padding: 12px;
            color: black;
            background-color: #ededed;
            box-shadow: none;
        }
    </style>
 
    
    
    <!-- flowplayer javascript component -->
    <script src="http://releases.flowplayer.org/js/flowplayer-3.2.11.min.js"></script>
 
    </head>
 
<body>
    <!-- set up player container named "httpstreaming-dynamic" -->
<a class="player" id="httpstreaming-dynamic" style="display:block;width:400px;height:100px;"></a>
 
<!-- this script block will install Flowplayer inside previous A tag -->
<script> 
flowplayer('httpstreaming-dynamic', 'flowplayer/flowplayer-3.2.12.swf', {
    clip: {
        // the manifest file
        url: 'smil:<smil file>.smil/manifest.f4m',
 
        // we need 2 urlResolvers
        urlResolvers: ['f4m','bwcheck'],
 
        // use the httpstreaming plugin
        provider: 'httpstreaming',
 
        // directory where the manifest and video fragments are stored
        baseUrl: 'http://<wowza server IP>/<application name>',
 
        autoPlay: true
    },
    plugins: {
        f4m: {
            url: 'flowplayer/flowplayer.f4m-3.2.9.swf'
        },
        httpstreaming: {
            url: 'flowplayer/flowplayer.httpstreaming-3.2.8.swf'
        },
        controls: {
            // the 'tube' skin
            url: 'flowplayer/flowplayer.controls-tube-3.2.12.swf'
        },
 		smil: {
			url: 'flowplayer.smil-3.2.8.swf'
		},
        bwcheck: {
            url: 'flowplayer/flowplayer.bwcheck-httpstreaming-3.2.9.swf',
            dynamic: true,
            // show the selected file in the content box
            // usually omitted in production
            onStreamSwitchBegin: function (newItem, currentItem) {
                var content = $f('httpstreaming-dynamic').getPlugin('content');
                var message = 'Will switch to: ' +
                               newItem.streamName +
                                ' from ' +
                                currentItem.streamName;
                content.setHtml(message);
            },
            onStreamSwitch: function (newItem) {
                var content = $f('httpstreaming-dynamic').getPlugin('content');
                var message = 'Switched to: ' + newItem.streamName;
                content.setHtml(message);
            }
        },
 
        // a content box to display the selected bitrate
        // usually omitted in production
        content: {
            url: 'flowplayer/flowplayer.content-3.2.8.swf',
            bottom: 30,
            left: 0,
            width: 400,
            height: 40,
            backgroundColor: 'transparent',
            backgroundGradient: 'none',
            border: 0,
            textDecoration: 'outline',
            style: {
                body: {
                    fontSize: 14,
                    fontFamily: 'Arial',
                    textAlign: 'center',
                    color: '#ffffff'
                }
            }
        }
    }
});
</script>
</body>
 
</html>

note that you will need the following for this to work for both OSMF and Flowplayer:

The shoutcast setup as follows:

Encoder sending Audio(64k) --> Shoutcast <-- Wowza --> Clients

Encoder sending Audio(32k) --> Shoutcast <-- Wowza --> Clients

(Only one Wowza server)

a standard SHOUTCAST application created from the examples folder: https://www.wowza.com/docs/how-to-re-stream-audio-from-shoutcast-icecast

a more detailed SMIL file created from the tutorial: https://www.wowza.com/docs/how-to-create-and-play-smil-files-with-streams-created-by-wowza-transcoder

because of this forum post: iOS Adaptive Bit Rate streaming using Smil file problems

for an explanation of each variable in the more detailed SMIL file, go here: https://www.wowza.com/docs/how-to-add-resolution-and-codec-metadata-to-ios-streams

it will help with specifying the right codecs depending on your stream.

the streams need to be started by either the StreamManager or startupstreams.xml and a mechanism put in place to ensure the stream resets if it becomes unstable etc

You will need the necessary flowplayer plugins:

flowplayer-3.2.11.min.js

flowplayer-3.2.12.swf

flowplayer.bwcheck-3.2.10.swf

flowplayer.bwcheck-httpstreaming-3.2.9.swf

flowplayer.content-3.2.8.swf

flowplayer.controls-3.2.12.swf

flowplayer.controls-tube-3.2.12.swf

flowplayer.f4m-3.2.9.swf

flowplayer.httpstreaming-3.2.8.swf

flowplayer.ipad-3.2.10.js

flowplayer.rtmp-3.2.10.swf

flowplayer.smil

flowplayer.smil-3.2.8.swf

You will need to have either a reference to the OSMF swf or capture/download the SWF by some means.

You can generate an OSMF player here: http://www.osmf.org/dev/2.0gm/setup.html

Both these solutions should work for audio and video however. You will need to change the application to live and forget about shoutcast however.

And that should be that I would think.

Thank you to Jason and Richard for their input here. Thanks to all the other forum members I can think of that all had some input.

Thanks also to Flowplayer for all their snippets and demos.

I do not claim to have invented this merely put alot of brilliant minds’ work together.

Cady