Skip to main content

Record live streams

Recording a live stream encapsulates the stream content into a video file in a specific format. Based on where you intend to save the recording file, Agora provides the following recording modes:

  • Standard recording: This mode saves the recording file to Agora's default storage space.
  • Custom recording: This mode saves the recording file to a third-party cloud storage service of your choice, such as Qiniu Cloud, Amazon S3, or Alibaba Cloud.

This page introduces how to use these recording modes.

Considerations

If your Agora project (as identified by the App ID) has multiple entry points, their recording behavior must be consistent.

For example, for an Agora project that has two entry points (A and B), only the following cases are supported:

Entry point AEntry point B
Enable standard recording for all live streamsEnable standard recording for all live streams
Enable custom recording for all live streamsEnable custom recording for all live streams
Enable standard recording for certain live streamsEnable standard recording for certain live streams
Enable custom recording for certain live streamsEnable custom recording for certain live streams

Enable recording for all live streams under an entry point

Depending on your business scenario, recording configurations can vary by entry point.

Standard recording

Call the Set standard recording configuration API. If the call is successful, standard recording is automatically enabled for all live streams under the entry point.

Custom recording

Call the Set custom recording configuration API. If the call is successful, custom recording is automatically enabled for all live streams under the entry point.

Enable recording for certain live streams under an entry point

In some scenarios, you might only need to record some of the live streams under an entry point. To this end, you need to disable the current recording of all live streams under the entry point, and then enable recording for each live stream.

The action of enabling recording for a live stream remains effective for 24 hours. The following figure shows an example of how enabling recording interacts with various live streams:

The recording result of each stream is as follows:

  • Stream A was already being pushed, so recording starts immediately and continues until streaming ends.
  • Stream B starts being pushed within 24 hours after recording is enabled, so recording starts once streaming starts and continues until streaming ends.
  • Stream C starts being pushed more than 24 hours after recording is enabled, so recording does not start.

Standard recording

Follow these steps to enable standard recording for a live stream:

  1. Call the Set standard recording configuration API and set the format of the recording file.
  2. Call the Enable/Disable standard recording for an entry point API and set enabled to false, which disables the current standard recording for the entry point.
  3. Call the Enable standard recording for a live stream API and set the required parameters such as the live stream name.

Custom recording

Follow these steps to enable custom recording for a live stream:

  1. Call the Set custom recording configuration API, and set the format of the recording file and third-party cloud storage.
  2. Call the Enable/Disable custom recording for an entry point API and set enabled to false, which disables the current custom recording for the entry point.
  3. Call the Enable custom recording for a live stream API and set the required parameters such as the live stream name.

Page Content