Create an HTTP provider in the Wowza Streaming Engine Java API that will automatically generate a SMIL file for adaptive bitrate playback of transcoded renditions of a live source.
Notes:
- Wowza Streaming Engine™ 4.7.1 or later is required.
- To use an HTTP provider to generate a SMIL file, you may have to set the Admin user name and password, because Administrator uses port 8086. Set the Admin user name and password in the [install-dir]/conf/admin.password file. For more information, see Manage users with the Wowza Streaming Engine CLI password tool.
- Open [install-dir]/conf/VHost.xml in a text editor and change the AuthenticationMethod for com.wowza.wms.http.HTTPProviderMediaList to none:
<HTTPProvider> <BaseClass>com.wowza.wms.http.HTTPProviderMediaList</BaseClass> <RequestFilters>medialist*</RequestFilters> <AuthenticationMethod>none</AuthenticationMethod> </HTTPProvider>
This HTTP provider can be found on each host port, so you might need to edit the HTTP provider in multiple places.
- Start Wowza Streaming Engine.
- While a transcode or transrate is in progress with a working Stream Name Group, open the following URL in a web browser:
http://[wowza-ip-address]:8086/medialist?streamname=[ngrp-name]&application=[application]&format=smil
Where:- [wowza-ip-address] is the Wowza Streaming Engine server IP address,
- [ngrp-name] is the Stream Name Group StreamName as defined in your template file (located by default in [install-dir]/transcoder/templates), and
- [application] is the application name.
For example, if your stream name is myStream, your application name is myApplication, and you're using the sample template transrate.xml, which defines a Stream Name Group stream name named myStream_all, the two new streams that are created are named myStream_360p and myStream_160p. You would open the following URL:
http://[wowza-ip-address]:8086/medialist?streamname=ngrp:myStream_all&application=myApplication&format=smil
This would automatically generate the following SMIL file:
<smil> <head></head> <body> <switch> <video src="mp4:myStream_source" system-bitrate="2270208" width="1280" height="720"> <param name="audioBitrate" value="196608" valuetype="data"/> <param name="videoBitrate" value="2073600" valuetype="data"/> <param name="videoCodecId" value="avc1.4d401f" valuetype="data"/> <param name="audioCodecId" value="mp4a.40.2" valuetype="data"/> </video> <video src="mp4:myStream_360p" system-bitrate="1046608" width="640" height="360"> <param name="audioBitrate" value="196608" valuetype="data"/> <param name="videoBitrate" value="850000" valuetype="data"/> <param name="videoCodecId" value="avc1.4d401f" valuetype="data"/> <param name="audioCodecId" value="mp4a.40.2" valuetype="data"/> </video> <video src="mp4:myStream_160p" system-bitrate="396608" width="284" height="160"> <param name="audioBitrate" value="196608" valuetype="data"/> <param name="videoBitrate" value="200000" valuetype="data"/> <param name="videoCodecId" value="avc1.428015" valuetype="data"/> <param name="audioCodecId" value="mp4a.40.2" valuetype="data"/> </video> </switch> </body> </smil>
Note: The transrate.xml template has two more <Encode> blocks, one defined for a 720p rendition and the other for a 240p rendition. By default, the <Enable> flag is set to false so that these two streams won't be generated and won't be available to players. Change the <Enable> flag to true to enable these additional streams.