A video conference with too many hosts may cause network latency and packet loss.
If we set the subscribing stream to the 1-N Mode (set one stream as high and the rest as low), then a maximum of 17 users can join as hosts in an interactive broadcast without any network latency.
A maximum of 17 users is supported on the PC platform, while a maximum of 7 users is supported on the mobile platform.
Before proceeding, ensure that you implement the basic interactive live streaming in your project. See Start Live Interactive Streaming for details.
Refer to the following steps to enable the video conference of 7+ users:
setParameters("{"che.audio.live_for_comm":true}")
to enable multi-party live broadcast mode.If the version of SDK is v2.3.1 or earlier, you need to call
setParameters("{\"che.video.moreFecSchemeEnable\":true}”)
to enable ULP FEC and improve the reliability of data transmission.
After joining a channel, the hosts call the enableDualStreamMode
method to enable the video dual stream mode.
After calling the method successfully, the SDK automatically sets the parameters of the low-video stream according to the parameters of the high-video stream.
The hosts call the setRemoteVideoStreamType
method to set one subscribed video stream as the high-video stream and other susbcribed streams as the low-video streams.
Agora does not recommend using video profiles that exceed either a resolution of 640 x 480 or a frame rate of 30 fps.
Resolution Frame Rate Bitrate 640 x 480 15 fps 500 Kbps 640 x 360 15 fps 400 Kbps 640 x 360 24 fps 800 Kbps
(Optional) Customize the default low-video stream parameters at the application level.
// Sets the video profile to 320 x 180, 15 fps, and 140 Kbps.
setParameters("{\"che.video.lowBitRateStreamParameter\":{\"width\":320,\"height\":180,\"frameRate\":15,\"bitRate\":140}}");
The aspect ratio of the low-stream video profile (width x height) should be identical to that of the preset video profile.
uid
if offline, call the setupRemoteVideo
method and set the view
as NULL to release all memory resources of the view used by that user.