CreateAppRecordTemplate
Creates an application recording template.
Operation description
QPS limit
The queries per second (QPS) limit for a single user is 10. If the limit is exceeded, API calls are throttled, which may affect your services. Call this API operation at a reasonable rate.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
rtc:CreateAppRecordTemplate |
none |
*App
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClientToken |
string |
No |
The client token. |
123e4567-e89b-12d3-a456-42665544**** |
| RecordTemplate |
object |
Yes |
The recording template. |
|
| Name |
string |
Yes |
The name of the template. |
Template |
| FilePrefix |
string |
Yes |
The naming rule for recorded files. Note
To ensure the uniqueness of recorded file names, the current naming rule for recorded files is record/{AppId}/{ChannelId}{TaskId}/{EscapedStartTime}{EscapedEndTime}. |
record/{AppId}/{ChannelId}_{TaskId}/{EscapedStartTime}_{EscapedEndTime} |
| FileSplitInterval |
integer |
Yes |
The splitting duration of the recorded file. The value must be greater than or equal to 1800. Unit: seconds. |
1800 |
| DelayStopTime |
integer |
No |
The delay time before stopping the recording. Unit: seconds. |
180 |
| MediaEncode |
integer |
Yes |
The encoding options. |
1 |
| Formats |
array |
Yes |
The format of the recorded file. Only .m3u8, .mp4, and .flv are supported. |
|
|
string |
No |
The specific format. |
mp4 |
|
| LayoutIds |
array |
No |
The list of layout IDs. A maximum of 16 layout IDs can be specified. Note: The layouts in the list must correspond to different numbers of data sources. |
|
|
string |
No |
The specific layout ID. |
1 |
|
| AppId |
string |
Yes |
The application ID. You can create and query the ID in the console. Only a single ID is supported. |
ac7N**** |
The valid values of MediaEncode are as follows.
| ID | Width | Height | Bitrate (Kbps) | Frame rate (FPS) | Remarks |
| 0 | 0 | 0 | 64 | 0 | Audio only |
| 1 | 640 | 360 | 500 | 15 | |
| 10 | 960 | 540 | 700 | 24 | |
| 20 | 1280 | 720 | 1024 | 24 | |
| 22 | 720 | 1280 | 1024 | 30 | |
| 23 | 800 | 600 | 1024 | 30 | |
| 24 | 750 | 780 | 1024 | 30 | |
| 25 | 750 | 540 | 700 | 30 | |
| 26 | 720 | 1280 | 2048 | 30 | |
| 27 | 1280 | 720 | 2048 | 30 | |
| 28 | 1280 | 720 | 3096 | 30 | |
| 30 | 1920 | 1080 | 2048 | 30 | |
| 31 | 1080 | 1920 | 2048 | 30 | |
| 32 | 1024 | 768 | 1024 | 24 | |
| 33 | 1280 | 960 | 1024 | 24 | |
| 34 | 1024 | 768 | 2048 | 24 | |
| 35 | 1280 | 960 | 2048 | 24 | |
| 36 | 1280 | 720 | 1024 | 24 | |
| 37 | 1280 | 720 | 2048 | 24 | |
| 38 | 540 | 960 | 750 | 15 | |
| 39 | 540 | 960 | 1500 | 30 | |
| 40 | 1280 | 720 | 1200 | 15 | |
| 41 | 720 | 1280 | 1200 | 15 | |
| 42 | 720 | 1280 | 1500 | 15 | |
| 43 | 540 | 960 | 1200 | 15 | |
| 52 | 640 | 360 | 500 | 30 | |
| 53 | 360 | 640 | 500 | 15 | |
| 54 | 360 | 640 | 500 | 30 | |
| 60 | 1920 | 1080 | 4096 | 30 | |
| 61 | 1080 | 1920 | 4096 | 30 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
Id of the request |
231470C1-ACFB-4C9F-844F-4CFE1E3804C5 |
| TemplateId |
string |
The template ID. |
lD7muaxx |
Examples
Success response
JSON format
{
"RequestId": "231470C1-ACFB-4C9F-844F-4CFE1E3804C5",
"TemplateId": "lD7muaxx"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ParameterError | %s. | |
| 400 | Function.Disable | %s. | Function status is invalid, please request in function enabled state. |
| 400 | Quota.Invalid | %s. | Resource quota is insufficient, please submit a work order to increase the quota |
| 404 | NotFound | %s. | The requested resource does not exist |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.