Setting desired bitrate for video playback for multiple devices

This method is applicable for videos playing on Flash player. Our HTML5 player by default selects the best video stream based on user’s network conditions (adaptive streaming). This blog references our API version v2. For details on using this feature with our API v3 please visit the Server API Docs

Different devices and internet speeds require different bitrate to be served. Based on device type and your viewer connection, some of you may opt to initiate video streaming at a particular bitrate. You may want to provide playback at a certain quality or constrain network data for users. Video Bitrate, resolution and quality can therefore be configured. Below are the steps.

First, Send in an extra parameter while setting up the otp. Append a post parameter called “forcedBitrate”. This need to be an integer. During load time, the player obtains the list of available resolutions from the server. If the forcedBitrate is set, it starts playing the bitrate which is closest to that one.

Example

If you have a video with bitrates created at [300, 900, 1500, 2100].  By default, the player will try to guess the correct bitrate based on a number of factors. If you believe that the default rate should be 900, set the value of forcedBitrate to 900. If the forcedBitrate is set to 1100, then player will calculate the bitrate closest to it and play it. This will ensure that the player will continue playing inspire of any error.

Here is a sample curl command for the otp call with forcedBitrate included:

curl 'http://api.vdocipher.com/v2/otp?video=xxxxxxxxxxxxxx' -H 'Content-Type: application/x-www-form-urlencoded' --data 'clientSecretKey=CLIENT_SECRET_KEY&forcedBitrate=1100'

Check the Api Page for more info about VdoCipher APIs.

You may also like...