ScreenVideoParameters

The video configuration for the shared screen stream.

struct ScreenVideoParameters {
    VideoDimensions dimensions;
    int frameRate = 15;
     int bitrate;
    VIDEO_CONTENT_HINT contentHint = VIDEO_CONTENT_HINT::CONTENT_HINT_MOTION;

  ScreenVideoParameters() : dimensions(1280, 720) {}
};

Attributes

dimensions
The video encoding dimension. The default value is 1280 × 720.
If the aspect ratio of dimensions is different from that of the screen, the SDK adjusts the video encoding resolution according to the following rules (take the dimensions of 1280 × 720 as an example):
  • When the width and height of the screen are both lower than those of dimensions, the SDK uses the resolution of the screen for video encoding. For example, if the screen is 640 × 360, the SDK uses 640 × 360 for video encoding.
  • When either the width or height of the screen is higher than that of dimensions, the SDK uses the maximum values that do not exceed those of dimensions while maintaining the aspect ratio of the screen for video encoding. For example, if the screen is 2000 × 1500, the SDK uses 960 × 720 for video encoding.
Note:
  • The billing for the screen sharing stream is based on the value of dimensions. When you do not pass in a value, Agora bills you at 1280 × 720; when you pass in a value, Agora bills you at that value. For billing details, see Pricing.
  • The value of this parameter does not indicate the orientation mode of the output video. For how to set the video orientation, see ORIENTATION_MODE.
  • Whether the 720p resolution or above can be supported depends on the device. If the device cannot support 720p, the frame rate will be lower than the set value.
frameRate
The video encoding frame rate (fps). The default value is 15.
bitrate
The video encoding bitrate (Kbps).
contentHint
The content hint for screen sharing. See VIDEO_CONTENT_HINT.