CreateLivePullToPush
Call CreateLivePullToPush to create a pull-to-push task.
Operation description
For pricing details, see Pull-to-push pricing.
Call this operation to create a pull-to-push task.
Supports creating live stream pull tasks and VOD pull tasks.
After a task is created, it starts running at the specified start time and automatically stops and is deleted at the specified end time.
The push destination URL specified in the task must not be used by other tasks. Otherwise, multiple tasks pushing to the same URL simultaneously will cause push failures.
Pull-to-push callback events include task running status change callbacks and task exit callbacks. For more information, see Pull-to-push event callbacks.
QPS limit
The single-user QPS limit for this operation is 10 calls per second. If the limit is exceeded, API calls will be throttled, which may affect your business. Please call this operation appropriately.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
live:CreateLivePullToPush |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
Region ID. |
cn-beijing |
| Region |
string |
Yes |
Specifies the region where the task is launched. Valid values:
Valid values:
|
cn-shanghai |
| TaskName |
string |
No |
Task name, used to support fuzzy query. Default value: "". |
test |
| StartTime |
string |
Yes |
Task start time. Note
|
2024-08-26T10:30:00Z |
| EndTime |
string |
Yes |
Task end time. Note
|
2024-08-27T14:30:00Z |
| SourceType |
string |
Yes |
Source stream type. Valid values:
Valid values:
|
live |
| SourceProtocol |
string |
No |
Source stream protocol name. Valid values:
Note
This parameter is required only when the SourceType parameter is set to live, and is invalid when the value is vod or url. |
rtmp |
| SourceUrls |
array |
Yes |
List of source stream URL addresses. Note
|
|
|
string |
No |
Source stream URL address. Note
|
rtmp://pulltest.****.aliyunlive.com/pulltest493/pulltest-w434 |
|
| DstUrl |
string |
Yes |
Destination URL address for pushing the stream. Note
|
rtmp://pushtest.********.aliyunlive.com/pulltest493/pulltest-w434 |
| RepeatNumber |
integer |
No |
Number of times to repeat playback after the initial playback is complete. Valid values:
Note
This parameter applies only to VOD or third-party video streams. |
0 |
| FileIndex |
integer |
No |
File index. Starts playback from the nth file. |
0 |
| Offset |
integer |
No |
Start offset. The offset value from the beginning of the video file. Unit: seconds. Valid values: greater than 0. Note
|
2 |
| CallbackUrl |
string |
No |
HTTP callback URL. Default value: empty. Note
|
https://callback*****.com |
| RetryInterval |
integer |
No |
Retry interval, in seconds. Valid values: [60, 300]. Default value: 60 seconds. |
60 |
| RetryCount |
integer |
No |
Number of retries. Default value: 3. |
3 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
Request ID. |
16A96B9A-F203-4EC5-8E43-CB92E68***** |
| RetCode |
integer |
Return code. Note
|
0 |
| Description |
string |
Error description. |
OK |
| TaskId |
string |
Task ID. |
fd245384-4067-4f91-9d75-9666a6bc9**** |
Examples
Success response
JSON format
{
"RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68*****",
"RetCode": 0,
"Description": "OK",
"TaskId": "fd245384-4067-4f91-9d75-9666a6bc9****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | %s. | Parameter error |
| 400 | InvalidParam.CodeIllegalDuration | %s. | The value of start time should be less than the value of end time . |
| 400 | CodeInvalidAliUid | This aliuid does not have a live domain name. | This aluid does not have a live domain name. |
| 400 | CodeNotEnoughResource | Exceeded configuration limits or insufficient resources. | Exceeded configuration limits or insufficient resources |
| 400 | CodeConfigAlreadyExists | Code Config Already Exists | |
| 500 | InternalError | %s. | error on the live liveapi server. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.