logoUIKit
On this page

Set video config

If you want configure streaming video, we allowing to select appropriate parameters such as video encoding format, bitrate, resolution, and frame rate based on your needs.

By using ZegoUIKitPrebuiltCallConfig.videoConfig, it becomes easy to configure.

Here is an example:

Call
Invitation
ZegoUIKitPrebuiltCall(
    ...
    config: ZegoUIKitPrebuiltCallConfig.oneOnOneVideoCall()
      ..videoConfig = ZegoUIKitVideoConfig.preset1080P(),
    ...
)
1
Copied!
ZegoUIKitPrebuiltCallInvitationService().init(
    ...
    requireConfig: (ZegoCallInvitationData data) {
        final config = ZegoUIKitPrebuiltCallConfig.groupVideoCall();
        ...
        config.videoConfig = ZegoUIKitVideoConfig.preset1080P();
        ...
        return config;
    },
);
1
Copied!

And, we have compiled a set of common preset configurations for these parameters. You can use these common configurations or customize the specific parameters yourself.

ZegoVideoConfigPresetCapture resolution
(Width × Height)
Encoder resolution
(Width × Height)
Frame rate
(fps)
Preset180P180 × 320180 × 32015
Preset270P270 × 480270 × 48015
Preset360P360 × 640360 × 64015
Preset540P540 × 960540 × 96015
Preset720P720 × 1280720 × 128015
Preset1080P1080 × 19201080 × 192015
Preset2K1440 × 25601440 × 256015
Preset4K2160 × 38402160 × 384015

Additionally, implemented a traffic control mechanism that automatically adjusts the video configuration based on real-time network traffic conditions, ensuring a smooth viewing experience even in poor network conditions.

On this page

Back to top