AddLiveAppSnapshotConfig
Configures snapshot settings. The output is saved to OSS and takes effect after the stream is re-ingested.
Operation description
-
Make sure that you fully understand the billing methods and pricing of live stream snapshots before you call this operation. For billing details, refer to Billing of live stream snapshots.
-
ApsaraVideo Live stream snapshot feature requires snapshot files to be stored in a bucket. Therefore, you must activate OSS and have at least one bucket to store these snapshot files. For more information, refer to Configure OSS.
-
Live stream snapshots are stored in OSS, which incurs storage fees. For billing details in OSS, refer to Storage fees.
-
The OSS bucket must be in the same region as ApsaraVideo Live center of the streaming domain name. Cross-region snapshots are not supported.
QPS limits
The QPS limit per user for this operation is 30 calls per second. If the limit is exceeded, API calls are throttled, which may affect your business. Call this operation at a reasonable rate.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
live:AddLiveAppSnapshotConfig |
create |
*Domain
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DomainName |
string |
Yes |
The primary streaming domain name. |
example.com |
| AppName |
string |
Yes |
The name of the application to which the stream belongs. The template takes effect only when the AppName matches the AppName in the ingest URL. The name can be up to 255 characters in length and can contain digits, letters, hyphens (-), and underscores (_). It cannot start with a hyphen or an underscore. You can also set this parameter to an asterisk (*) to match all application names. |
liveApp**** |
| TimeInterval |
integer |
Yes |
The snapshot interval. A snapshot is captured at each interval. Unit: seconds. Valid values: 5 to 3600. |
5 |
| OssEndpoint |
string |
Yes |
The endpoint of the OSS bucket. After the configuration is complete, you can find the specified configuration in the OSS console based on the callback information. The OSS endpoint must be created in advance. For more information about how to create an OSS endpoint, refer to Configure OSS. |
cn-oss-****.aliyuncs.com |
| OssBucket |
string |
Yes |
The name of the OSS bucket. After the configuration is complete, you can find the specified configuration in the OSS console based on the callback information. The OSS bucket must be created in advance. For more information about how to create an OSS bucket, refer to Configure OSS. |
liveBucket**** |
| OverwriteOssObject |
string |
No |
The file name for overwritten snapshots. Each snapshot overwrites this file.
|
{AppName}/{StreamName}.jpg |
| SequenceOssObject |
string |
No |
The file name for real-time snapshots. Each snapshot is stored with an incremented sequence number. You can call the DescribeLiveStreamSnapshotInfo operation to query snapshot files within a specific time period.
|
snapshot/{AppName}/{StreamName}/{UnixTimestamp}.jpg |
| Callback |
string |
No |
The callback URL for snapshots. |
https://learn.aliyundoc.com |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
16A96B9A-F203-4EC5-8E43-CB92E68F4CD8 |
Examples
Success response
JSON format
{
"RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidOverwriteOssObjectOrSequenceOssObject.Malformed | Specified paramters OverwriteOssObject or SequenceOssObject should have one. | You can specify only one of the OverwriteOssObject and SequenceOssObject parameters. |
| 400 | InvalidOssBucket.Malformed | Specified parameter OssBucket is not valid. | The OSSBucket parameter is invalid. Check whether the OSS BUCKET parameter is correct. |
| 400 | InvalidOssEndpoint.Malformed | Specified parameter OssEndpoint is not valid. | |
| 400 | InvalidOverwriteOssObject.Malformed | Specified parameter OverwriteOssObject is not valid. | The OverwriteOSSObject parameter is invalid. Check whether the OverwriteOSSObject parameter is correct. |
| 400 | InvalidSequenceOssObject.Malformed | Specified parameter SequenceOssObject is not valid. | Invalid value of SequenceOssObject. Check whether the SequenceOssObject parameter that you specified is correct. |
| 400 | InvalidOssBucket.NotFound | The parameter OssBucket does not exist. | |
| 400 | ConfigAlreadyExists | Config has already exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.