• How to generate a SMIL file with an HTTP Provider

    This article describes how to create an HTTP Provider that will automatically generate a SMIL file for adaptive-bitrate playback of transcoded renditions of a live source.

    Notes:
    • For use with Wowza Streaming Engine software.

    • 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.
    1. 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>*jwplayer.rss|*jwplayer.smil|*medialist.smil|*manifest-rtmp.f4m</RequestFilters>
      	<AuthenticationMethod>none</AuthenticationMethod>
      </HTTPProvider>
      This HTTPProvider can be found on each Host Port, so you might need to edit the HTTP Provider in multiple places.

    2. Start your Wowza media server.

    3. 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 media 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).
      [application] is the application name.

      For example, if your stream name is myStream, your application name is live, 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=live&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>
    Notes:
    • Wowza Media Server™ 3 software users must use either the text editor method or the HTTP Provider method described in this article to create a SMIL file with the following syntax, where the system-bitrate value is set to the total bitrate (in bits-per-second) for that stream:
      <smil>
      	<head>
      	</head>
      	<body>
      		<switch>
      			<video src="myStream_source" system-bitrate="1496608"/>
      			<video src="myStream_360p" system-bitrate="850000"/>
      			<video src="myStream_160p" system-bitrate="200000"/>
      		</switch>
      	</body>
      </smil>
    • 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.

    More references



    Originally Published: 10-08-2011.
    Updated: for Wowza Streaming Engine on 05-02-2016.

    If you're having problems or want to discuss this article, post in our forum.