Live Recording

Last update:2026-04-07 18:21:15

This guide provides a comprehensive overview of how to manage, automate, and control live stream recordings on Media Acceleration Live Broadcast using API.

Please note that to ensure platform stability, all recording APIs share a request rate limit of 300 requests per 5 minutes per user.

Our recording APIs are designed around a three-tier workflow: Templates (defining how to record), Rules (automating when to record), and Real-Time Controls (manually triggering recordings).

1. Defining Your Recording Strategies (Template APIs)

Before you can record any stream, you need to tell our system how it should be recorded and where it should be stored. This is done by creating a Recording Parameter Template.

API Name Used for
AddRecordingParameterTemplate Creates a template that specifies the storage destination (your Object Storage bucket name, management URL, AccessKey/SecretKey), file path naming conventions, and callback notification URLs. You also use it to set your output format and define automatic file segmentation limits by file size or time interval.
QueryRecordingParameterTemplate Retrieves a list of your existing templates or details of a specific template using its templateId.
ModifyRecordingParameterTemplate updates the configuration of an existing template.
DeleteRecordingParameterTemplate Deletes an existing template.
Note that for operational safety, you cannot delete a template while it is actively associated with recording rules; you must disassociate it first.

2. Automating Recordings (Rule APIs)

Once your templates are ready, you can automate your recordings by binding a templateId to specific live streams using Recording Rules.

API Name Used for
AddRecordingRules Creates a rule that associates a templateId with your live streams. You can target streams broadly by Delivery Domain or specifically by Application Name or Stream Name. The system applies rules based on specificity using the “longest match” principle, meaning a specific stream rule will take precedence over a general domain rule.
QueryRecordingRule Retrieves a list of existing rules, allowing you to filter by parameters like ruleId, templateId, domain, or stream name.
ModifyRecordingRules Updates the settings of an existing recording rule.
DeleteRecordingRules Deletes a recording rule.
Note that you cannot delete rules that are currently active or executing a recording.

3. Manually Control Recordings (Real-Time Control APIs)

Sometimes, you need to trigger an immediate recording on the fly. In these cases, you can manually control sessions.

API Name Used for
StartRealTimeRecord Triggers an immediate recording for active live streams. You must provide a templateId and a list of up to 5 stream delivery URLs. This API responds with a persistentId, which acts as the unique identifier for that specific recording task. The recording will continue until the stream naturally ends or you manually terminate it.
StopRealTimeRecord Terminates an active, manually-started recording task before the live stream ends. You must provide the persistentId (returned from the Start API) in the request path to stop the specific recording session.
Is the content of this document helpful to you?
Yes
I have suggestion
Submitted successfully! Thank you very much for your feedback, we will continue to strive to do better!