Players often need to share their screens during game streaming. This article introduces how to adjust the frame rate, resolution, and bitrate when screen-sharing a game to improve the audience's viewing experience.
On Android and iOS platforms, Agora recommends that you do the following to share games by screen sharing.
setVideoEncoderConfiguration
to set the video encoding profile of the screen-sharing stream.startScreenCapture
to start screen sharing and use ScreenCaptureParameters
to set the video encoding profile of the screen-sharing stream.For details, see Share the Screen (Android) and Share the Screen (iOS).
The optimal video profile varies according to the gaming scenario. The overarching principle is as follows:
Use the following diagram to determine your gaming scenario, then refer to the scenarios table for suggested video profile settings.
Category | Quality level | Frame rate (fps) | Resolution | Bitrate (Kbps) |
---|---|---|---|---|
Scenario 1: Ultra-high image-refresh frequency | Smooth | 24 | 640 × 360 | 1800 ~ 2200 |
High-definition | 24 | 840 × 480 | 2600 ~ 2800 | |
Scenario 2: Low image-refresh frequency | Smooth | 10 | 840 × 480 | 800 |
High-definition | 10 | 1280 × 720 | 1400 | |
Scenario 3: High image-refresh frequency, high frame rate | Smooth | 24 | 840 × 480 | 1400 ~ 1600 |
High-definition | 24 | 1280 × 720 | 2000 ~ 2200 | |
Scenario 4: High image-refresh frequency, low frame rate, and rich image detail | Smooth | 15 | 840 × 480 | 1000 ~ 1200 |
High-definition | 15 | 1280 × 720 | 1600 ~ 1800 | |
Scenario 5: High image-refresh frequency, low frame rate, and low image detail | Smooth | 15 | 640 × 360 | 800 ~ 1000 |
High-definition | 15 | 840 × 480 | 1400 ~ 1600 |
Scenario 1: Ultra-high image-refresh frequency
Typical examples include running games, such as Temple Run and Subway Surfers, and racing games. These games require the highest frame rates, such as 24 fps.
Scenario 2: Low image-refresh frequency
Typical examples include Angry Birds and Snake. These games do not require high frame rates, so you can use a lower setting, such as 10 fps. If video profiles at the smooth quality level fail to display the full gaming screen, switch to the high-definition quality level.
Scenario 3: High image-refresh frequency, high frame rate
Typical examples include gun games, such as Game for Peace. These games require a higher frame rate and resolution, such as 24 fps and 1280 × 720, because their images tend to be rich in detail.
Scenario 4: High image-refresh frequency, low frame rate, and rich image detail
Typical examples include MOBA games, such as Honor of Kings. These games do not require the highest frame rates but do require higher resolutions. A typical setting might be 15 fps and 1280 × 720.
Scenario 5: High image-refresh frequency, low frame rate, and low image detail
Typical examples include tower defense games, such as Plants vs. Zombies, and fishing games. These games do not require the highest frame rates or higher resolutions. A typical setting might be 15 fps and 840 × 480.