Adds a live stream encapsulation configuration.
- The first time you configure encapsulation for a domain name, domain acceleration is automatically configured and takes effect in 3 to 5 minutes.
- If the streaming domain resides in a region outside China, including Singapore, Germany (Frankfurt), Japan (Tokyo), and Indonesia (Jakarta), you may encounter high latency issues. We recommend that you test and verify whether the settings meet expectations.
- You can call this operation to add a live stream encapsulation configuration. The configuration takes effect only after you re-ingest the stream.
QPS limit
You can call this operation up to 300 times per minute per account. Requests that exceed this limit are dropped and you will experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limits.
Debugging
Request parameters
Parameter |
Type |
Required |
Example |
Description |
Action | String | Yes | AddLivePackageConfig | The operation that you want to perform. Set the value to AddLivePackageConfig. |
DomainName | String | Yes | example.com | The main streaming domain. |
AppName | String | Yes | AppName | The application name. A value of |
StreamName | String | Yes | StreamName | The stream name. A value of |
Protocol | String | Yes | HLS_CMAF | The streaming protocol and encapsulation format. Valid values:
|
SegmentNum | Integer | No | 3 | The number of segments.
|
SegmentDuration | Integer | No | 5 | The segment length. Unit: seconds.
|
PartDuration | Integer | No | 350 | The part length. Unit: milliseconds.
|
IgnoreTranscode | Boolean | No | true | Specifies whether to ignore the transcoded stream. Valid values:
|
Response parameters
Parameter |
Type |
Example |
Description |
RequestId | String | 05D00B48-DF50-5DC0-A07D-A250DFAE**** | The request ID. |
Examples
Sample requests
http(s)://live.aliyuncs.com/?Action=AddLivePackageConfig
&DomainName=example.com
&AppName=AppName
&StreamName=StreamName
&Protocol=HLS_CMAF
&SegmentNum=3
&SegmentDuration=5
&PartDuration=350
&IgnoreTranscode=true
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<AddLivePackageConfigResponse>
<RequestId>05D00B48-DF50-5DC0-A07D-A250DFAE4258</RequestId>
</AddLivePackageConfigResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "05D00B48-DF50-5DC0-A07D-A250DFAE4258"
}
Error codes
For a list of error codes, see Service error codes.