Do scheduled adaptive bitrate streaming using the stream class and Wowza Streaming Engine Java API

For use in this example, you can download the following versions of the big buck bunny clip and put them in the Wowza Streaming Engine™ server content folder:

Each item must be keyframe-aligned for switching to work. For encoding suggestions to achieve this, see Encode VOD using FFmpeg with Wowza Streaming Engine.

  1. Make sure the wse-plugin-streampublisher.zip is installed and configured. For instructions, see Schedule streaming with a Wowza Streaming Engine Java module.
  2. Create the streamschedule.smil file in the [install-dir]/content directory, making sure to include all stream renditions you intend to use. For example:
    <smil>
        <head>
        </head>
        <body>
         	 <stream name="Stream1"></stream>
         	 <stream name="Stream2"></stream>
    	 <stream name="Stream3"></stream>
    
            <playlist name="pl1" playOnStream="Stream1" repeat="true" scheduled="2014-12-11 16:26:00">
                <video src="mp4:bigbuckbunny_450.mp4" start="0" length="-1"/>
            </playlist>
    	<playlist name="pl2" playOnStream="Stream2" repeat="true" scheduled="2014-12-11 16:26:00">
                <video src="mp4:bigbuckbunny_750.mp4" start="0" length="-1"/>
            </playlist>
            <playlist name="pl3" playOnStream="Stream3" repeat="true" scheduled="2014-12-11 16:26:00">
                <video src="mp4:bigbuckbunny_1100.mp4" start="0" length="-1"/>
            </playlist>
        </body>
    </smil>
  3. Create the switching SMIL file (switch.smil) in the content folder:
    <smil>
    	<head>
    	</head>
    	<body>
    		<switch>
    			<video src="Stream1" system-bitrate="450000"/>
    			<video src="Stream2" system-bitrate="750000"/>
    			<video src="Stream3" system-bitrate="1100000"/>
    		</switch>
    	</body>
    </smil>
  4. Restart Wowza Streaming Engine to load the scheduler.

HLS playback URL:

http://[wowza-ip-address]:1935/[application-name]/smil:switch.smil/playlist.m3u8