All Products
Search
Document Center

:AddLivePackageConfig

最終更新日:Oct 09, 2024

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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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 * specifies that all applications are matched.

StreamName String Yes StreamName

The stream name. A value of * specifies that all streams under the application are matched.

Protocol String Yes HLS_CMAF

The streaming protocol and encapsulation format. Valid values:

  • HLS_CMAF
  • LLHLS_TS

    (low latency)

  • LLHLS_CMAF (low latency)
  • DASH_CMAF
  • HLSDASH_CMAF
SegmentNum Integer No 3

The number of segments.

  • Valid values: 3 to 10.
  • Default value: 3.
SegmentDuration Integer No 5

The segment length. Unit: seconds.

  • If Protocol is set to HLS_CMAF, the valid values of this parameter are 1 to 10 and the default value of this parameter is 5.
  • If Protocol is set to LLHLS_TS or LLHLS_CMAF, the valid values of this parameter are 1 to 2 and the default value of this parameter is 1.
PartDuration Integer No 350

The part length. Unit: milliseconds.

  • If the value of SegmentDuration is 1, the valid values of this parameter are 100 to 500 and the default value of this parameter is 350.
  • If the value of SegmentDuration is 2, the valid values of this parameter are 100 to 1000 and the default value of this parameter is 700.
  • This parameter takes effect only if Protocol is set to LLHLS_TS or LLHLS_CMAF.
IgnoreTranscode Boolean No true

Specifies whether to ignore the transcoded stream. Valid values:

  • true (default)
  • false

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.