Skip to main content

Set the video profile

In composite recording mode, you can set the video profile (resolution, frame rate, and bitrate) for the output video stream. Agora recommends setting the video profile according to the values listed in the video profile table. For Cloud Recording, use transcodingConfig to set the video profile. For On-Premise Recording, use mixResolution to set the video profile.

In individual recording mode, the recorded video keeps the original video profile.

Basic guidelines

  • Agora recommends setting the recording resolution lower than the aggregate resolution of the original video streams, otherwise the recorded video may be blurry.
  • The resolution you set in the video profile is that of the video canvas, and its aspect ratio does not need to be identical to any source video stream. The aspect ratio of each user region in the output video depends on the aspect ratio of the canvas and the video layout. See Related articles.
  • Agora only supports the following frame rates: 1 fps, 7 fps, 10 fps, 15 fps, 24 fps, 30 fps, and 60 fps. The default value is 15 fps. If you set other frame rates, the SDK uses the default value.
  • The base bitrate in the video profile table applies to the communication profile. The live-broadcast profile generally requires a higher bitrate to ensure better video quality. Set the bitrate of the live-broadcast profile as twice the base bitrate.
  • Increasing the bitrate improves the output video quality, but requires higher bandwidth. The maximum bitrate is 6500 Kbps. Exceeding the limit causes an error.

Calculate a bitrate manually

If you cannot find a matching video profile in the table, follow these steps to manually calculate a proper bitrate:

  1. In the video profile table, find the resolution closest to your target resolution.
  2. Calculate a bitrate based on your target frame rate. When the resolution is fixed, the bitrate increases as the frame rate increases. Suppose the base bitrate is x when the frame rate is 15 fps:
    • If the frame rate is 5 fps, the base bitrate is 0.5x.
    • If the frame rate is 30 fps, the base bitrate is 1.5x.
    • If you use a different frame rate, set the bitrate depending on the interval that the frame rate falls into. For example, if the frame rate is 10 fps, set the bitrate between 0.5x and 1x.

Suppose your target resolution is 300 * 240 with a frame rate of 30 fps. The closest resolution in the video profile table is 320 * 240, with a base bitrate of 200 Kbps and a frame rate of 15 fps. The inferred bitrate should be 200 Kbps * 1.5, which is 300 Kbps.

Video profile table

Resolution (width * height)Frame rate (fps)Base bitrate (Kbps, communication profile)Live bitrate (Kbps, live-broadcast profile)
160 * 1201565130
120 * 1201550100
320 * 18015140280
180 * 18015100200
240 * 18015120240
320 * 24015200400
240 * 24015140280
424 * 24015220440
640 * 36015400800
360 * 36015260520
640 * 360306001200
360 * 36030400800
480 * 36015320640
480 * 36030490980
640 * 480155001000
480 * 48015400800
640 * 480307501500
480 * 480306001200
848 * 480156101220
848 * 480309301860
640 * 48010400800
1280 * 7201511302260
1280 * 7203017103420
960 * 720159101820
960 * 7203013802760
1920 * 10801520804160
1920 * 10803031506300
1920 * 10806047806500
vundefined