startLocalVideoTranscoder abstract method

Future<void> startLocalVideoTranscoder(
  1. LocalTranscoderConfiguration config
)

Starts local video mixing.

After calling this method, you can merge multiple video streams locally into one stream. For example: merge video streams from camera capture, screen sharing, media player, remote video, video files, images, etc., into one stream, and then publish the mixed video stream to the channel. Local video mixing consumes high CPU resources. Agora recommends enabling this feature on high-performance devices. If you need to mix locally captured video streams, the SDK supports the following combinations: On Windows, up to 4 camera video streams + 4 screen sharing streams can be mixed. On macOS, up to 4 camera video streams + 1 screen sharing stream can be mixed. On Android and iOS, up to 2 camera video streams (requires dual camera support or external camera support) + 1 screen sharing stream can be mixed. When configuring mixing, ensure that the layer index of the camera video stream capturing the portrait is higher than that of the screen sharing stream, otherwise the portrait will be covered and not appear in the final mixed video stream.

  • config The configuration for local video mixing. See LocalTranscoderConfiguration. The maximum resolution for each video stream involved in local mixing is 4096 × 2160. Exceeding this limit will cause mixing to fail. The maximum resolution of the mixed video stream is 4096 × 2160.

Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly. See Error Codes for details and resolution suggestions.

Implementation

Future<void> startLocalVideoTranscoder(LocalTranscoderConfiguration config);