Red5Pro IOS Client SDK

 10.0.0
Core SDK for IOS
Adaptive Bitrate Publishing

Setup

Attach an R5AdaptiveBitrateController to any R5Stream to dynamically control the bitrate that is being published by the attached R5VideoSource.

R5Stream *stream = ...;
[controller attachToStream:stream];
R5AdaptiveBitrateController allows you to dynamically control the bitrate of the publisher on an R5St...
Definition: R5AdaptiveBitrateController.h:48
id attachToStream:(R5Stream *stream)
Attach the controller to a stream.
The main stream class of Red5Pro. Utilizes the R5Connection to connect and communicate with a server ...
Definition: R5Stream.h:43

The R5Configuration.buffer_time controls how much publishing data is allowed to buffer on the publishing client before the quality is downgraded. If the buffer is empty, the quality will continue to improve until a balance can be found.

Details on Bit Rate

The R5AdaptiveBitrateController uses a default step size of 200 kbps to increase and decrease quality to improve network conditions, while providing the highest quality video possible. If the maximum bit rate is lower than a 200 kbps step size can support, the step size will equal MAXIMUM_BITRATE / 5;

MAXIMUM_BITRATE is set to the R5VideoSource.bitrate; The adaptive bitrate will not go over this value. MINIMUM_BITRATE is set to 16. The iOS encoder will never reach this bitrate. In this case it will use the smallest bitrate that is possible for the encoder. This value will depend on the resolution of the stream.

If network performance is still degraded at the MINIMUM_BITRATE, video will stop sending altogether and only audio will stream. You can disable this feature by setting R5AdaptiveBitrateController.requireVideo to TRUE;