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.

Example code

Device calibration is enabled by default; to disable it:


To re-enable it, use:


For further details of the API calls used above, see the DeviceCalibration class reference.

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


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.

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.