The video encoder configuration.

This interface sets the video encoder configuration in setVideoEncoderConfiguration.

Depending on the OS, browser, and camera, the actual resolution, frame rate, and bitrate might be different from the set values.

Hierarchy

  • VideoEncoderConfiguration

Index

Properties

Optional bitrate

bitrate: object

The video bitrate (Kbps). The value range is [1,10000000].

We recommend setting the bitrate between 100 Kbps and 5000 Kbps. You can refer to the table below and set your bitrate.

Video Profile Definition

Video profile Resolution Frame rate (fps) Bitrate (Kbps) Chrome Firefox Safari
120p_1 160 × 120 15 65  
120p_3 120 × 120 15 50  
180p_1 320 × 180 15 140  
180p_3 180 × 180 15 100  
180p_4 240 × 180 15 120  
240p_1 320 × 240 15 200  
240p_3 240 × 240 15 140  
240p_4 424 × 240 15 220  
360p_1 640 × 360 15 400  
360p_3 360 × 360 15 260  
360p_4 640 × 360 30 600  
360p_6 360 × 360 30 400  
360p_7 480 × 360 15 320  
360p_8 480 × 360 30 490  
360p_9 640 × 360 15 800  
360p_10 640 × 360 24 800  
360p_11 640 × 360 24 1000  
480p_1 640 × 480 15 500
480p_2 640 × 480 30 1000
480p_3 480 × 480 15 400
480p_4 640 × 480 30 750
480p_6 480 × 480 30 600
480p_8 848 × 480 15 610
480p_9 848 × 480 30 930
480p_10 640 × 480 10 400
720p_1 1280 × 720 15 1130
720p_2 1280 × 720 30 2000
720p_3 1280 × 720 30 1710
720p_5 960 × 720 15 910
720p_6 960 × 720 30 1380
1080p_1 1920 × 1080 15 2080  
1080p_2 1920 × 1080 30 3000  
1080p_3 1920 × 1080 30 3150  
1080p_5 1920 × 1080 60 4780  
1440p 2560 × 1440 30 4850  
1440p_1 2560 × 1440 30 4850  
1440p_2 2560 × 1440 60 7350  
4K_1 3840 × 2160 30 8910  
4K_3 3840 × 2160 60 13500  

Note:

  • Whether 1080 resolution or above can be supported depends on the device. If the device cannot support 1080p, the actual frame rate is lower than the one listed in the table. Agora optimizes the video on low-end devices.

  • With the update of web browsers, this table might not reflect all the supported profiles for each browser. The actual support is subject to the device and web browser version.

  • Some versions of some web browsers might not support all the video profiles listed in the table. In this case, we recommend you use the mainstream video profiles (the ones with the _1 suffix in the above table).

  • The Safari browser does not support modifying the video frame rate (30 fps by default). If you set a frame rate other than 30 fps on Safari, the browser may change or reject your setting.

  • Due to limitations of some devices and browsers, the resolution you set may fail to take effect and get adjusted by the browser. In this case, billings are calculated based on the actual resolution.

Type declaration

  • max: number

    The maximum bitrate.

  • min: number

    The minimum bitrate.

Optional frameRate

frameRate: object

The video frame rate (fps). The value range is [1, 10000].

Set this parameter as a value range, where the minimum is the expected frame rate, and the maximum is the upper limit of the adjusted frame rate when the browser does not support the expected frame rate.

Note

  • This parameter sets the local capturing video frame rate. The actual encoding frame rate depends on the device, system, and browser.
  • When the network conditions change, the browser adjusts the encoding frame rate automatically.

Type declaration

  • max: number

    The upper limit of the frame rate when the browser does not support the frame rate specified by min.

  • min: number

    The default frame rate. The SDK uses this value as the expected frame rate. We recommend setting this value between 5 and 30.

Optional resolution

resolution: object

Resolution of the video.

We recommend using common resolutions, for example:

  • 480 × 360
  • 640 × 480
  • 960 × 720

Type declaration

  • height: number

    Height of the video. The value range is [1,10000].

  • width: number

    Width of the video. The value range is [1,10000].