The Real-Time Communication (RTC) software development kit (SDK) lets you set video encoding properties to improve the user experience in different scenarios. This topic describes how to set these properties.
Background information
In Real-Time Communication scenarios, you can set video encoding properties to adjust video definition and smoothness. For one-to-one video calls, you can increase the resolution and frame rate for a better user experience. If multiple users are in a channel, you can lower the resolution and bitrate to reduce resource consumption and downstream bandwidth usage.
Implementation
The RTC SDK uses the setVideoEncoderConfiguration method to set video encoding properties.
- (void)setVideoEncoderConfiguration:(AliRtcVideoEncoderConfiguration* _Nonnull)config;| Name | Type | Description |
| config | AliRtcVideoEncoderConfiguration* _Nonnull | Predefined video encoding properties.
|
Note
- Higher resolutions and frame rates require higher bitrates to achieve the desired video definition and smoothness. This increases device resource consumption and network bandwidth usage. The RTC SDK provides default values for video encoding properties. To customize these properties, see Video resolution, frame rate, and bitrate reference.
- To maintain call performance in weak network conditions, the RTC SDK can monitor network changes. It can adjust the main video stream specifications, prioritize subscribing to the remote low-quality stream, or publish only the audio stream to ensure a basic call experience. For more information, see Network environment monitoring and weak network policies and Dual-stream video specifications.
该文章对您有帮助吗?