TranscodingUser

Used to configure the transcoding parameters for each host.

struct TranscodingUser {
  uid_t uid;
  int x;
  int y;
  int width;
  int height;
  int zOrder;
  double alpha;
  int audioChannel;
};

Properties

uid
The user ID of the host.
x
The x-coordinate (in pixels) of the host's video in the output frame, with the top-left corner as the origin. The range is [0, width], where width is the value set in LiveTranscoding.
y
The y-coordinate (in pixels) of the host's video in the output frame, with the top-left corner as the origin. The range is [0, height], where height is the value set in LiveTranscoding.
width
The width (in pixels) of the host's video.
height
The height (in pixels) of the host's video.
zOrder
Note:
  • If the value is less than 0 or greater than 100, the ERR_INVALID_ARGUMENT error is returned.
  • Setting zOrder to 0 is supported.
The layer index of the host's video. The range is [0, 100].
  • 0: (Default) The host's video is at the bottom layer.
  • 100: The host's video is at the top layer.
alpha
The transparency of the host's video. The range is [0.0, 1.0].
  • 0.0: Completely transparent.
  • 1.0: (Default) Opaque.
audioChannel
Note: If this value is not 0, a special player is required.
The audio channel used by the host's audio in the output audio. The default value is 0. The range is [0, 5].
  • 0: (Recommended) Default setting. Supports up to stereo, depending on the host's upstream audio.
  • 1: The host's audio uses the FL channel. If the host sends multiple channels, the Agora server mixes them into mono.
  • 2: The host's audio uses the FC channel. If the host sends multiple channels, the Agora server mixes them into mono.
  • 3: The host's audio uses the FR channel. If the host sends multiple channels, the Agora server mixes them into mono.
  • 4: The host's audio uses the BL channel. If the host sends multiple channels, the Agora server mixes them into mono.
  • 5: The host's audio uses the BR channel. If the host sends multiple channels, the Agora server mixes them into mono.
  • 0xFF or values greater than 5: The host's audio is muted, and the Agora server removes the audio.