# setMixTranscodingConfig method Null safety

Future<void> setMixTranscodingConfig(

1. TRTCTranscodingConfig? config

)

Set On-Cloud MixTranscoding parameters

If you have enabled the "Enable Relayed Push" option on the "Function Configuration" page in the TRTC console, then every channel in the room will have a default CSS CDN address.

There may be multiple anchors in a room, each sending their own video and audio, but CDN audience needs only one live stream. Therefore, you need to mix multiple audio/video streams into one standard live stream, which requires mixtranscoding.

When you call the setMixTranscodingConfig() API, the SDK will send a command to the Tencent Cloud transcoding server to combine multiple audio/video streams in the room into one stream. You can use the "mixUsers" parameter to set the position of each channel of image and specify whether to mix only audio. You can also set the encoding parameters of the mixed stream, including "videoWidth", "videoHeight", and "videoBitrate".

For more information, please see On-Cloud MixTranscoding.

Parameters:

config For more information, please see the description of `TRTCTranscodingConfig` in `trtc_cloud.def.dart`. If `null` is passed in, On-Cloud MixTranscoding will be canceled.

## Implementation

    Future<void> setMixTranscodingConfig(TRTCTranscodingConfig? config) {
      if (kIsWeb) {
        return _channel.invokeMethod(
            'setMixTranscodingConfig', jsonEncode(config));
      }
      return _channel.invokeMethod('setMixTranscodingConfig', {
        "config": jsonEncode(config),
      });
    }