Creates a pull-to-push task.
Operation description
For pricing details, see Pull-to-push Fees.
You can call this API to create a pull-to-push task.
This API supports both live stream pulling and video-on-demand (VOD) stream pulling tasks.
After you create a task, it starts at the specified start time and stops at the specified end time. The task is automatically deleted after it stops.
The destination ingest URL for a task must be unique. If multiple tasks push streams to the same URL, ingestion will fail.
Pull-to-push callback events include task status change callbacks and task exit callbacks. For more information, see Pull-to-push Event Callbacks.
QPS limit
This API supports up to 10 calls per second per user. If you exceed this limit, throttling is triggered, which may affect your business operations. It is recommended that you adhere to this limit.
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 |
The region ID. |
cn-beijing |
| Region |
string |
Yes |
The region where the task runs. Valid values:
|
cn-shanghai |
| TaskName |
string |
No |
The task name. You can use this name for fuzzy searches. Default value: empty string. |
test |
| StartTime |
string |
Yes |
The task start time. Note
|
2024-08-26T10:30:00Z |
| EndTime |
string |
Yes |
The task end time. Note
|
2024-08-27T14:30:00Z |
| SourceType |
string |
Yes |
The source stream type. Valid values:
|
live |
| SourceProtocol |
string |
No |
The source stream protocol. Valid values:
Note
This parameter is required only when SourceType is live. It is ignored if SourceType is vod or url. |
rtmp |
| SourceUrls |
array |
Yes |
The list of source stream URLs. Note
|
testurls |
|
string |
No |
The source stream URL. Note
|
rtmp://pulltest.****.aliyunlive.com/pulltest493/pulltest-w434 |
|
| DstUrl |
string |
Yes |
The destination ingest URL. Note
|
rtmp://pushtest.********.aliyunlive.com/pulltest493/pulltest-w434 |
| RepeatNumber |
integer |
No |
The number of times to repeat playback after the stream ends. Valid values:
Note
This parameter applies only to video-on-demand (VOD) or third-party video streams. |
0 |
| FileIndex |
integer |
No |
The file index. Playback starts from the Nth file. |
0 |
| Offset |
integer |
No |
The start offset of the video file. Unit: seconds. Value must be greater than 0. Note
|
2 |
| CallbackUrl |
string |
No |
The HTTP webhook address. Default value: empty. Note
|
https://callback*****.com |
| RetryInterval |
integer |
No |
The retry interval. Unit: seconds. Valid values: 60 to 300. Default value: 60. |
60 |
| RetryCount |
integer |
No |
The number of retries. Default value: 3. |
3 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Response schema |
||
| RequestId |
string |
The request ID. |
16A96B9A-F203-4EC5-8E43-CB92E68***** |
| RetCode |
integer |
The return code. Note
|
0 |
| Description |
string |
The error description. |
OK |
| TaskId |
string |
The 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.