Note: Be sure the to add the properties to the correct <Properties> container on Application.xml. There are several in the file.
<Property> <Name>cupertinoChunkDurationTarget</Name> <Value>10000</Value> <Type>Integer</Type> </Property> <Property> <Name>cupertinoMaxChunkCount</Name> <Value>10</Value> <Type>Integer</Type> </Property> <Property> <Name>cupertinoPlaylistChunkCount</Name> <Value>3</Value> <Type>Integer</Type> </Property> <Property> <Name>cupertinoRepeaterChunkCount</Name> <Value>3</Value> <Type>Integer</Type> </Property>
The process is quite simple. Audio and video packets from the live encoder enter Wowza Media Server and are segmented into chunks based on time. The duration of each chunk (in milliseconds) is control by the cupertinoChunkDurationTarget setting. As the chunks are created, they are added to the available chunk list. The maximum number of chunks stored in the available chunk list is controlled by the cupertinoMaxChunkCount setting. When an iOS device requests the stream, a playlist is returned that contains the [n] most recently added chunks. The number of items returned in the playlist ([n]) is controlled by the cupertinoPlaylistChunkCount setting.
The live stream repeater is the system that's used to deliver a single live stream in an origin/edge configuration to multiple edge servers. The first time an edge server requests the stream, it pulls the previously segmented chunks from the origin to the edge for delivery to an iOS device. The cupertinoRepeaterChunkCount setting controls the number of chunks that are immediately sent from the origin to the edge after initial connection. It's best if this setting is equal to or greater than cupertinoPlaylistChunkCount but less then cupertinoMaxChunkCount.
Chunks must start on a key frame, so it's best to use a key frame interval that is factor of the cupertinoChunkDurationTarget setting. For example, if cupertinoChunkDurationTarget is set to 10 seconds then use a key frame interval of either 2, 2.5, 5, or 10 seconds.
To estimate how much memory is used to store the chunks for a single live stream, use the following formula:
[total-memory-mb] = ([stream-bitrate-kbps]/([1024-kb-per-mb]*[8-bits-per-byte])) * [cupertinoChunkDurationTarget-seconds] * [cupertinoMaxChunkCount]
(500/(1024*8)) * 10 * 10 = 6 MB of memory
<Property> <Name>cupertinoChunkDurationTarget</Name> <Value>10000</Value> <Type>Integer</Type> </Property>
- Click here, if you are having problems or would like to discuss this article.
- Leave a comment below, if there is some aspect of this article you would like to see changed or improved.