All Products
Search
Document Center

ApsaraVideo Live:Configure stream pulling

Last Updated:Sep 09, 2024

Stream pulling refers to the process of uploading third-party streaming URLs to a live center of ApsaraVideo Live for media processing and accelerated content delivery. ApsaraVideo Live allows you to configure regular stream pulling and triggered stream pulling. This topic describes how to configure stream pulling in the ApsaraVideo Live console.

Terms

ApsaraVideo Live supports regular stream pulling and triggered stream pulling.

  • Regular stream pulling: specifies the start time and end time for stream pulling. ApsaraVideo Live pulls live streams during the specified period, regardless of whether playback requests are sent.

  • Triggered stream pulling: triggers stream pulling only if playback requests are sent. In other words, ApsaraVideo Live pulls live streams when the streaming URL of the specified domain name is used for streaming. If no playback requests are sent, ApsaraVideo Live does not pull live streams from the origin.

Note

If you want to pull third-party live streams that are encoded in the H.265 format, contact us.

Limits

  • Regular stream pulling

    • Third-party source URLs in the Real-Time Messaging Protocol (RTMP), Flash Video (FLV), HTTP Live Streaming (HLS), and Secure Reliable Transport (SRT) formats are supported. You can add up to four URLs.

    • You can configure up to 300 templates for regular stream pulling. If you want to increase the maximum allowed number of the templates, increase the number of source streams. For more information, see Quota management. After the adjustment, the maximum allowed number of templates for regular stream pulling is the same as the number of source streams.

    • The duration from the time when stream pulling starts to the time when stream pulling ends cannot exceed seven days.

    • No switch is provided for regular stream pulling over SRT. You only need to ensure that the stream provided by the origin is in the SRT format.

  • Triggered stream pulling

    • The RTMP, FLV, and HLS protocols are supported.

    • You can configure up to 200 templates for triggered stream pulling.

  • For stream pulling over SRT, only regular stream pulling is supported.

  • You cannot pull streams from IPv6 addresses.

Go to the configuration page

  1. Log on to the ApsaraVideo Live console.
  2. In the left-side navigation pane, click Domain Names. The Domain Management page appears.

  3. Find the streaming domain that you want to configure and click Domain Settings in the Actions column.

  4. In the left-side navigation tree, choose Streaming Management > Back-to-origin Stream Pulling. By default, the Triggered Stream Pulling tab appears.

Configure triggered stream pulling

  1. On the Triggered Stream Pulling tab, click Add.

  2. Configure triggered stream pulling.

    Note

    You can configure up to 200 templates for triggered stream pulling.

    触发拉流配置

    The following table describes the parameters for triggered stream pulling.

    Parameter

    Description

    AppName in Streaming URL

    The name of the application to which the live stream belongs. This parameter is used to generate a streaming URL. The value of this parameter does not need to be the same as the application name that is specified in the ingest URL.

    However, if you do not set the AppName in Source URL parameter, the value of this parameter must be the same as the application name that is specified in the ingest URL.

    If you want to configure stream pulling for all applications in your domain name, set this parameter to ali_all_app.

    AppName in Source URL

    The name of the application for back-to-origin stream pulling. The value of this parameter must be the same as the application name that is specified in the ingest URL.

    If you do not set this parameter, the value of the AppName in Streaming URL parameter is used. In this case, the value of the AppName in Streaming URL parameter must be the same as the application name that is specified in the ingest URL.

    Source URL

    The URL of the third-party live stream. You can add up to four URLs.

    Protocol for Back-to-origin Stream Pulling

    The RTMP, FLV, and HLS formats are supported.

    Triggered for Transcoding

    • If you enable this feature, stream pulling from the origin is automatically triggered when you play source streams or transcoded streams.

    • If you disable this feature, stream pulling from the origin is automatically triggered only when you play source streams.

  3. Click OK.

Configure regular stream pulling

  1. Click the Regular Stream Pulling tab, and click Add.

  2. Configure regular stream pulling.

    Important
    • You can add up to four source URLs.

    • You can configure up to 300 templates for regular stream pulling. If you want to increase the maximum allowed number of the templates, increase the number of source streams. For more information, see Quota management. After the adjustment, the maximum allowed number of templates for regular stream pulling is the same as the number of source streams.

    • The duration from the time when stream pulling starts to the time when stream pulling ends cannot exceed seven days.

    拉流配置

    The following table describes the parameters for regular stream pulling.

    Parameter

    Description

    AppName

    The name of the application. This parameter is used to generate a streaming URL. The value of this parameter does not need to be the same as the application name that is specified in the ingest URL.

    If you want to configure stream pulling for all applications in your domain name, set this parameter to ali_all_app.

    StreamName

    The name of the live stream, which must be unique among templates.

    Source URL

    The URL of the third-party live stream.

    URLs in the RTMP, FLV, and SRT formats are supported. You can add up to four URLs.

    Start Time/End Time

    The start time and end time of stream pulling. Stream pulling stops when the end time is reached.

  3. Click OK.

Modify the configurations of stream pulling

You can modify the configurations of stream pulling to handle unexpected situations in which the origin is unavailable.

  1. On the configuration page, click the Triggered Stream Pulling or Regular Stream Pulling tab to view the existing configurations of stream pulling.

  2. Find the template that you want to modify and click Modify in the Actions column.

    修改拉流配置

  3. In the Stream Pulling Settings dialog box, modify the stream pulling settings.

    For more information about the parameters, see the Configure regular stream pulling and Configure triggered stream pulling sections of this topic.

  4. Click OK.

Important
  • Regular stream pulling

    After you modify the configurations, streams are pulled again based on the modified configurations. Make sure that the modification does not affect any running business.

  • Triggered stream pulling

    • After you modify the configurations, existing playback requests comply with the origin configurations before the modification, and new playback requests comply with the modified origin configurations.

    • If the AppName in Streaming URL parameter is specified when you configure stream pulling, you cannot leave this parameter empty when you modify the stream pulling settings.

Callback logic

Callback logic

  1. During stream ingest over Real-Time Messaging Protocol (RTMP), ApsaraVideo Live checks whether the stream ingest client closes the connection within 2 seconds after ApsaraVideo Live receives an OnPublish message. If the stream ingest client does not close the connection, ApsaraVideo Live sends a callback notification about the successful stream ingest.

  2. Assume that you have Ingest Domain A and Streaming Domain B that are associated with each other, and you configure regular stream pulling and triggered stream pulling for Streaming Domain B. If you want to receive callback notifications about the stream pulling status, configure stream ingest callbacks for Ingest Domain A. After the configuration, the same callback logic as the preceding applies to stream pulling under Streaming Domain B. By default, stream pulling is considered successful if the client does not close the connection within 2 seconds.

Note

We recommend that you issue the streaming URL after you confirm that the stream ingest or pulling is successful based on callback notifications and the response to your call of the DescribeLiveStreamsOnlineList operation.