Last update:2026-04-15 18:20:37
This guide covers how to manage, automate, and control live stream recordings on Media Acceleration Live Broadcast using the Recording API.
The recording system is built around three layers:
Templates are the foundation. Both Rules and Real-Time Controls reference a template by its templateId, so you must create at least one template before using the other APIs.
All recording APIs share a rate limit of 300 requests per 5 minutes per user. Plan your integration accordingly to avoid throttled requests.
A Recording Parameter Template tells the system how a recording should behave: where to store the output, how to name the files, when to segment, and where to send callback notifications.
Every recording — whether automated or manually triggered — requires a templateId, so templates are always the first thing you create.
| API Name | What It Does |
|---|---|
| AddRecordingParameterTemplate | Creates a new recording template. You specify the storage destination (Object Storage bucket name, management URL, AccessKey/SecretKey), file path naming conventions, callback notification URLs, output format, and automatic file segmentation limits (by file size or time interval). |
| QueryRecordingParameterTemplate | Retrieves a list of your existing templates, or the details of a specific template by its templateId. |
| ModifyRecordingParameterTemplate | Updates the configuration of an existing template. |
| DeleteRecordingParameterTemplate | Deletes an existing template. |
Warning: You cannot delete a template that is currently associated with one or more recording rules. Disassociate the template from all rules before deleting it.
Once you have a template, you can automate recordings by creating Recording Rules. A rule binds a templateId to one or more live streams so that recording starts automatically whenever those streams go live.
You can target streams at three levels of specificity:
The system applies rules using the longest match principle: a rule targeting a specific stream name takes precedence over a broader domain-level rule. This lets you set wide defaults and override behavior for individual streams when needed.
| API Name | What It Does |
|---|---|
| AddRecordingRules | Creates a rule that associates a templateId with live streams. You can scope the rule by Delivery Domain, Application Name, or Stream Name. |
| QueryRecordingRule | Retrieves a list of existing rules. You can filter results by ruleId, templateId, domain, or stream name. |
| ModifyRecordingRules | Updates the settings of an existing recording rule. |
| DeleteRecordingRules | Deletes a recording rule. |
Warning: You cannot delete a rule that is currently active or executing a recording. Wait for the recording to complete or stop it before deleting the rule.
When you need to record a live stream immediately — outside of any automated rule — use the Real-Time Control APIs to start and stop recording sessions manually.
How the workflow connects:
templateId and up to 5 stream delivery URLs.persistentId, which uniquely identifies that recording task.persistentId.Always store the
persistentIdreturned by the Start API. It is the only way to stop a specific recording session before the stream ends.
| API Name | What It Does |
|---|---|
| StartRealTimeRecord | Triggers an immediate recording for active live streams. Requires a templateId and a list of up to 5 stream delivery URLs. Returns a persistentId that uniquely identifies the recording task. |
| StopRealTimeRecord | Terminates an active, manually started recording task. Requires the persistentId (returned by StartRealTimeRecord) in the request path. |