The iOS playlist format supports CODECS and RESOLUTION attributes/metadata in the playlist.m3u8 data. This metadata is used by the devices to select the appropriate streams for playback based on the capabilities of a given device. For example, an older iPhone 3 is only capable of playing H.264 Baseline Level 3.0 or lower stream while an iPad can play H.264 Main level 3.1 or lower. This features enables you to create a single multi-bitrate stream that includes both formats. The iPad will play the higher quality stream and the iPhone the lower.
For single streams you can add this metadata by adding the following two properties to the HTTPStreamer/Properties container in [install-dir]/conf/[application]/Application.xml (be sure to get the correct container there are several in the Application.xml file):
<Property> <Name>cupertinoCalculateCodecs</Name> <Value>true</Value> <Type>Boolean</Type> </Property> <Property> <Name>cupertinoCalculateResolution</Name> <Value>true</Value> <Type>Boolean</Type> </Property>
<smil> <head> </head> <body> <switch> <video src="mp4:myStream1" system-bitrate="340000" width="320" height="240"> <param name="audioCodecId" value="mp4a.40.2" valuetype="data"/> <param name="videoCodecId" value="avc1.66.30" valuetype="data"/> </video> </switch> </body> </smil>
- Baseline: 66
- Main: 77
- High: 100
The codecIds for audio have the format mp4a.40.[objectType] where object type is:
- AAC-LC: 2
- HE-AAC: 5
- MP3: 34
Example values are:
- H.264 Baseline Profile level 3.0: avc1.66.30
- H.264 Main Profile level 3.0: avc1.77.30
- AAC-LC: mp4a.40.2
- HE-AAC: mp4a.40.5
- MP3: mp4a.40.34
Log statements have been improved when receiving a live stream that is being Cupertino packetized or when playing a video-on-demand stream to an iOS device to include the audio and video CODECS ids and the width and height of the video.
Note: This feature requires Wowza Media Server 2.2.0 or greater.
Originally Published: 11-22-2010.