Pulled-stream relay lets you pull existing live or video-on-demand (VOD) sources and push them as new live streams.
Overview
Pulled-stream relay pulls content from third-party live streams or recorded videos and broadcasts it to viewers in real time, without traditional ingest steps.
Workflow:
Typical scenario: Vehicle surveillance access
Vehicle-mounted devices often output video streams in private protocols such as JT/T 1078 or the Jiangsu Province standard. To connect such a stream to ApsaraVideo Live, use a protocol conversion gateway to convert the private-protocol stream into a standard RTMP stream. Then, create a pulled-stream relay task. Set Source Stream Type to Live Stream, set the source stream protocol to RTMP, and enter the converted RTMP source stream URL and the destination ingest URL. Mobile clients can then play the stream by using Alibaba Cloud Player SDK.
Usage notes
This feature is a paid feature. Billing starts at 00:00 on December 05, 2025. Pricing: Pulled-stream relay fees.
Each task pushes one stream. To push multiple streams, create multiple tasks.
You are responsible for ensuring that the content used with this feature complies with all applicable laws and regulations. ApsaraVideo Live provides only the stream transmission service. If any legal threats are identified, ApsaraVideo Live will stop the service for the related content and reserves the right to take legal action.
To pull or push streams outside the Chinese mainland, set the task region to a region outside the Chinese mainland.
This feature supports event callbacks. For details, see Pulled-stream relay event callbacks.
Each account can run up to 100 concurrent tasks.
Prerequisites
ApsaraVideo Live is activated.
You have the required information about the live or VOD source.
Source type
Information
Live
The playback URL of the live stream.
Supported protocols: RTMP, SRT, and HTTP-FLV.
VOD
The media asset ID of the VOD source. To get the ID, refer to Obtain or update media asset information.
Video
The URL path of the video source.
NoteThe video URL path must start with http:// or https:// and end with .mp4 or .flv.
NoteMaximum 30 VOD media asset IDs or video source URL paths.
Supported video codecs: H.264 and H.265.
Supported audio codec: AAC. Sampling rate: 16 kHz to 44.1 kHz.
VOD sources must use MP4 or FLV format.
An ingest URL is generated from your ingest domain. For more information, see Generate streaming URLs.
Procedure
Create a task
- Log on to the ApsaraVideo Live console.
In the navigation pane on the left, choose Feature Management > Pulled-stream Relay.
Select a live center region.
Click Create Task.
Configure the task parameters.
The following table describes the task parameters.
Parameter
Description
Region
The task region. Select based on the source data region or the destination region.
NoteSupported regions: China (Shanghai), China (Beijing), China (Shenzhen), Singapore, and Indonesia (Jakarta).
Task Name
A custom name for the task.
Task Time
Specify the start and end times for the job.
NoteThe task starts automatically at the specified start time. If it stops or fails to start, click Enable or Restart in the console.
Callback Information
Required. The webhook URL for task event notifications.
Source Type
The source stream type. Valid values:
Live Stream
VOD Asset
Video Path
Playback Times
Loop count for the playlist videos. Select infinite loop or specify a count.
NoteAvailable only when Source Stream Type is set to VOD Asset or Video Path.
Destination Ingest URL
The RTMP destination URL to push the stream to.
NoteExample of an ApsaraVideo Live ingest URL:
rtmp://ingestdomain.com/***/****?auth_key=****922353-0-0-*****f68cba72490a3328a1167c9****
Parameters by source stream type:
If Source Stream Type is set to Live Stream, the source supports RTMP, SRT, and HTTP-FLV.
If Source Stream Type is set to VOD Asset, enter the media asset ID in the video list. You can add up to 30 videos, and the system plays them in sequence. For Playback Times, select Loop or Specified.
If Source Stream Type is set to Video Path, enter the video URL.
NoteThe video URL path must start with http:// or https:// and end with .mp4 or .flv.
Click Submit to create the task.
You can also use the CreateLivePullToPush API operation to create a task.
Query a task
- Log on to the ApsaraVideo Live console.
In the navigation pane on the left, choose Feature Management > Pulled-stream Relay.
Select the region where you created the Pulled-stream Relay task. Then, you can perform a term query by Task ID, Task Name, or Destination Ingest URL.
You can also use the DescribeLivePullToPush API operation.
Modify a task
- Log on to the ApsaraVideo Live console.
In the navigation pane on the left, choose Feature Management > Pulled-stream Relay.
On the Pulled-stream Relay page, find the task that you want to modify and click Edit in the Actions column.
On the edit page, modify the parameters as needed and click Submit.
If a task is in the Not Started state, you can edit its Task Time, Callback Information, and Source Type.
If a task is in the Stopped state, you can edit its Callback Information and Source Type.
If the task is in any other state, you cannot edit the task.
You can also use the UpdateLivePullToPush API operation.
Delete a task
Pulled-stream relay tasks cannot be recovered.
- Log on to the ApsaraVideo Live console.
In the navigation pane on the left, choose Feature Management > Pulled-stream Relay.
On the Pulled-stream Relay page, find the task that you want to delete and click Delete in the Actions column.
In the dialog box that appears, click Delete to delete the task.
You can also use the DeleteLivePullToPush API operation.
Start a task
Only tasks in the Stopped state can be enabled.
The task starts automatically at the specified start time.
- Log on to the ApsaraVideo Live console.
In the navigation pane on the left, choose Feature Management > Pulled-stream Relay.
On the Pulled-stream Relay page, find the task that you want to start and click Enable in the Actions column.
In the dialog box that appears, click Enable to start the task.
Restart a task
Only tasks in the Running state can be restarted.
- Log on to the ApsaraVideo Live console.
In the navigation pane on the left, choose Feature Management > Pulled-stream Relay.
On the Pulled-stream Relay page, find the task that you want to restart and click Restart in the Actions column.
In the dialog box that appears, click Restart to restart the task.
You can also use the RestartLivePullToPush API operation.
Stop a task
You can Stop a task with the Running status.
- Log on to the ApsaraVideo Live console.
In the navigation pane on the left, choose Feature Management> Pulled-stream Relay.
On the Pulled-stream Relay page, find the task that you want to stop and click Stop in the Actions column.
In the dialog box that appears, click Stop to stop the task.
You can also use the StopLivePullToPush API operation.
FAQ
How do I generate a streaming URL after creating a task?
The streaming URL for a pulled-stream relay task must be generated based on the associated streaming domain, AppName, and StreamName that correspond to the destination ingest URL. You can generate this URL by using the URL generator in the console or by custom concatenation.
Will a pulled-stream relay task automatically resume if the third-party source stream disconnects?
When a third-party source stream disconnects, the task status changes to Recovering (abnormal). By default, the system attempts to pull the stream again every minute, up to three times.
If the source stream recovers and the stream is pulled successfully within 3 minutes, the task status automatically changes to Running (Normal).
If all three retries fail, the task status changes to Offline, and the system no longer automatically attempts to pull the stream. To restart the task, click the Restart button in the console or call the RestartLivePullToPush API.