Skip to main content
Skip table of contents

Device calibration and bitrate adaptation

Device calibration

The OpenTV Player can take advantage of hardware decoding where available. It can also set the maximum bitrate dynamically to take account of each device's hardware capabilities, ensuring smooth playback. This is known as device calibration, and it is done using device profiles.

Hardware decoding is known to work well on a limited number of devices. Each device must be thoroughly tested before enabling hardware decoding for it in a production player.
Also, some modern devices may have problems decoding particular streams. In such cases, forcing software decoding at the expense of a higher CPU-usage may be a solution.

Example code

Device calibration is enabled by default; to disable it:

JAVA
DeviceCalibration.disable()

To re-enable it, use:

JAVA
DeviceCalibration.enable()

Bitrate adaptation

The player usually selects the bitrate according to network conditions – if the available bandwidth is too low (causing frame drops), the player switches to a lower-bitrate stream. However, lower-powered devices can also experience frame drop because the hardware cannot cope with the amount of data it is being asked to decode. To account for this, you can enable performance-based bitrate adaptation (by default, it is disabled).

Example code

JAVA
NMPVideoView.setTrackDown(true)

You must also set the dropped frame threshold, which specifies the proportion of dropped frames that will cause the player to step down to the next available lower bitrate stream.

JAVA
NMPVideoView.setTrackDownThreshold(float ratio)

For example, if the expected frame rate of the playing video is 25fps and you want the player to switch to a lower bitrate stream if five or more frames are skipped per second, set the ratio to 0.20.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.