ScreenCaptureParameters
Screen sharing configurations.
Attributes
- dimensions
-
The video encoding resolution of the screen sharing stream.
If the screen dimensions are different from the value of this parameter, Agora applies the following strategies for encoding. Suppose dimensions is set to 1920 × 1080:- If the value of the screen dimensions is lower than that of dimensions, for example, 1000 × 1000 pixels, the SDK uses the screen dimensions, that is, 1000 × 1000 pixels, for encoding.
- If the value of the screen dimensions is higher than that of dimensions, for example, 2000 × 1500, the SDK uses the maximum value under dimensions with the aspect ratio of the screen dimension (4:3) for encoding, that is, 1440 × 1080.
Note: When setting the encoding resolution in the scenario of sharing documents (SCREEN_SCENARIO_DOCUMENT), choose one of the following two methods:- If you require the best image quality, it is recommended to set the encoding resolution to be the same as the capture resolution.
- If you wish to achieve a relative balance between image quality, bandwidth, and system performance, then:
- When the capture resolution is greater than 1920 × 1080, it is recommended that the encoding resolution is not less than 1920 × 1080.
- When the capture resolution is less than 1920 × 1080, it is recommended that the encoding resolution is not less than 1280 × 720.
- frameRate
- The frame rate (fps) of the shared region. The default value is 5. Agora does not recommend setting this to a value greater than 15.
- bitrate
- The bitrate (Kbps) of the shared region. The default value is 0 (the SDK works out a bitrate according to the dimensions of the current screen).