How to customize video quality choices for adaptive bitrate streams in Wowza Player

The Bitrate Selector menu in Wowza™ Player allows viewers to select their desired video quality when playing adaptive bitrate (ABR) streams. By default, video quality options in the Bitrate Selector show the bitrate (in Kbps) of each available video track. With Wowza Streaming Engine™ media server software, you can customize your stream's SMIL file to change the labels for all video track options. If video renditions in a SMIL file contain title attributes, Wowza Player uses these titles in the Bitrate Selector menu instead of the bitrates.

Note: To calculate the bitrate (in Kbps) to use in the Bitrate Selector menu, Wowza Player divides the rendition's bitrate by 1000. You can use the abrLabelBitrateDivisor Flash parameter to change this divisor (for example, to 1024). For more information, see Flash settings for Wowza Player.

Contents


Create an application and embed Wowza Player
Create and edit a SMIL file More resources

Create an application and embed Wowza Player


First, set up a live or video on demand (VOD) application with Wowza Streaming Engine or a live stream with the Wowza Streaming Cloud™ live streaming service. To create an an adaptive bitrate stream with Wowza Transcoder in Wowza Streaming Engine, see How to set up and run Wowza Transcoder for live streaming to configure Wowza Transcoder and the Adaptive bitrate streaming with Stream Name Groups section within that article to configure a group of live streams for adaptive bitrate playback. Alternatively, you can use a SMIL file for adaptive bitrate live or VOD streaming using your own keyframe-aligned renditions. For more information, see How to do adaptive bitrate streaming.

Use your Apple HLS stream URL and the Wowza Player Builder to generate embed code to add the player to your webpage. For more information on setting up Wowza Player with your stream, see Getting started with Wowza Player.

Create and edit a SMIL file


Next, you must create or edit the SMIL file for your stream. Use one of the following methods to create a SMIL file if you haven't done so already:
 
  • Wowza Streaming Engine Manager method - You can use the application-level SMIL Files feature in Wowza Streaming Engine Manager. See Wowza Streaming Engine Manager method, below.
     
  • Text editor method - You can use a text editor to create a SMIL file, making sure the editor doesn't append the .txt file extension to the file name. See Text editor method, below.

Wowza Streaming Engine Manager method

If you're running a Wowza Streaming Engine instance, the easiest way to create a SMIL file is using the SMIL Files feature in Wowza Streaming Engine Manager.
 
Note: If you have already created a SMIL file for your stream, skip to step 7 to add title attributes as Bitrate Selector menu options.
  1. In the Applications contents panel, click the name of your application, click SMIL Files, and then click Add SMIL File.
     
  2. In the Add SMIL File dialog box, enter a name for the new SMIL file (for example, myStream), and then click Add. The .smil file extension is automatically added to the name you enter.


     
  3. On the myStream.smil page, click Add SMIL Stream.


     
  4. In the Add SMIL Stream dialog box, select the video stream type, and then click Add.
     
  5. In the new SMIL stream page, enter your stream information including the Source (src) (the published stream name) and Video Bitrate (in bps). You can find your stream's information on the Incoming Streams page after connecting your stream. Add optional stream information into the System Language, Video Width, Video Height, and Audio Bitrate fields if desired. Click Add.


     
  6. Repeat steps 4-5 for the other video renditions in the stream. The order of renditions in the SMIL file doesn't affect how they appear in the Bitrate Selector as Wowza Player orders renditions from highest bitrate to lowest.
     
  7. In a text editor, open the new SMIL file in your [install-dir]/content folder. In each <video> entry in the SMIL file <switch> container, add a title attribute and set the value to the label you want to display in the Wowza Player Bitrate Selector menu. Then, save and close the file.
     
    <video src="myStream.stream_source" height="720" title="High">
    	<param name="videoBitrate" value="548000" valuetype="data"></param>
    </video>
  8. On the SMIL Files page in the Manager, click the Connect to SMIL file button next to your SMIL file to re-stream the streams listed in the SMIL file. Your SMIL file is valid if your Transcoder-generated streams have been replaced with the SMIL file streams on the Incoming Streams page.
     
  9. Test your stream in the Player Builder to make sure the new rendition labels appear in the Bitrate Selector. Add your SMIL file to your HLS stream URL using the following syntax:
     
    http://[wowza-ip-address]:1935/[application-name]/smil:myStream.smil/playlist.m3u8

Text editor method

To create a SMIL file for Wowza Streaming Engine using the text editor method:
 
  1. Using a text editor, create a SMIL file (for example, myStream.smil) in the [install-dir]/content folder. Make sure that your editor doesn't append the .txt file extension to the file name.
     
  2. Add stream information similar to the sample code below. In the <switch> container, create a <video> entry for each stream rendition. In each <video> entry, include the mandatory src attribute (the published stream name) and video-bitrate attribute (the bitrate of the video track in bps). Add the title attribute to all <video> entries. Make the value for each title attribute the label you want to display in the Wowza Player Bitrate Selector menu. The order of renditions in the SMIL file doesn't affect how they appear in the Bitrate Selector as Wowza Player orders renditions from highest bitrate to lowest.
     
    <smil>
            <head>
            </head>
            <body>
                    <switch>
    			<video height="720" src="myStream.stream_source" title="High">
    				<param name="videoBitrate" value="548000" valuetype="data"></param>
    			</video>
    			<video height="360" src="myStream.stream_360p" title="Medium" >
    				<param name="videoBitrate" value="100000" valuetype="data"></param>
    			</video>
    			<video height="180" src="myStream.stream_180p" title="Low">
    				<param name="videoBitrate" value="50000" valuetype="data"></param>
    			</video>
    		</switch>
    	</body>
    </smil>
    Note: For more information on optional attributes you can add to SMIL file renditions, see Understanding SMIL file syntax.
  3. Save and close the file. Test your stream in the Player Builder to make sure the new rendition labels appear in the Bitrate Selector. Add your SMIL file in your HLS stream URL using the following syntax:
     
    http://[wowza-ip-address]:1935/[application-name]/smil:myStream.smil/playlist.m3u8

More resources


Configuring Wowza Transcoder for live streaming in Wowza Streaming Engine Manager
How to create and play SMIL files with streams created by Wowza Transcoder
How to do adaptive bitrate streaming
Originally Published: For Wowza Player (Preview) on 10-24-2016.
 

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