Pulled-stream relay

更新时间:
复制 MD 格式

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:

image

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

    Video

    • The URL path of the video source.

      Note

      The video URL path must start with http:// or https:// and end with .mp4 or .flv.

    Note
    • Maximum 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

  1. Log on to the ApsaraVideo Live console.
  2. In the navigation pane on the left, choose Feature Management > Pulled-stream Relay.

  3. Select a live center region.

  4. Click Create Task.

  5. 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.

    Note

    Supported 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.

    Note

    The 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.

    Note

    Available 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.

    Note

    Example of an ApsaraVideo Live ingest URL:

    rtmp://ingestdomain.com/***/****?auth_key=****922353-0-0-*****f68cba72490a3328a1167c9****

    Parameters by source stream type:

    1. If Source Stream Type is set to Live Stream, the source supports RTMP, SRT, and HTTP-FLV.

    2. 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.

    3. If Source Stream Type is set to Video Path, enter the video URL.

      Note

      The video URL path must start with http:// or https:// and end with .mp4 or .flv.

  6. Click Submit to create the task.

Note

You can also use the CreateLivePullToPush API operation to create a task.

Query a task

  1. Log on to the ApsaraVideo Live console.
  2. In the navigation pane on the left, choose Feature Management > Pulled-stream Relay.

  3. 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.

Note

You can also use the DescribeLivePullToPush API operation.

Modify a task

  1. Log on to the ApsaraVideo Live console.
  2. In the navigation pane on the left, choose Feature Management > Pulled-stream Relay.

  3. On the Pulled-stream Relay page, find the task that you want to modify and click Edit in the Actions column.

  4. On the edit page, modify the parameters as needed and click Submit.

    1. If a task is in the Not Started state, you can edit its Task Time, Callback Information, and Source Type.

    2. If a task is in the Stopped state, you can edit its Callback Information and Source Type.

    3. If the task is in any other state, you cannot edit the task.

Note

You can also use the UpdateLivePullToPush API operation.

Delete a task

Important

Pulled-stream relay tasks cannot be recovered.

  1. Log on to the ApsaraVideo Live console.
  2. In the navigation pane on the left, choose Feature Management > Pulled-stream Relay.

  3. On the Pulled-stream Relay page, find the task that you want to delete and click Delete in the Actions column.

  4. In the dialog box that appears, click Delete to delete the task.

Note

You can also use the DeleteLivePullToPush API operation.

Start a task

Note
  • Only tasks in the Stopped state can be enabled.

  • The task starts automatically at the specified start time.

  1. Log on to the ApsaraVideo Live console.
  2. In the navigation pane on the left, choose Feature Management > Pulled-stream Relay.

  3. On the Pulled-stream Relay page, find the task that you want to start and click Enable in the Actions column.

  4. In the dialog box that appears, click Enable to start the task.

Restart a task

Note

Only tasks in the Running state can be restarted.

  1. Log on to the ApsaraVideo Live console.
  2. In the navigation pane on the left, choose Feature Management > Pulled-stream Relay.

  3. On the Pulled-stream Relay page, find the task that you want to restart and click Restart in the Actions column.

  4. In the dialog box that appears, click Restart to restart the task.

Note

You can also use the RestartLivePullToPush API operation.

Stop a task

Note

You can Stop a task with the Running status.

  1. Log on to the ApsaraVideo Live console.
  2. In the navigation pane on the left, choose Feature Management> Pulled-stream Relay.

  3. On the Pulled-stream Relay page, find the task that you want to stop and click Stop in the Actions column.

  4. In the dialog box that appears, click Stop to stop the task.

Note

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.