tencent cloud

Feedback

Feature Practice

Last updated: 2023-12-23 17:14:52

    Cross-Region Transport

    Scenario

    An event taking place in Chengdu, China, will be streamed live. The live stream is sent to Shanghai, China, where it will be processed. The processed video will then be sent to live streaming platforms in China, Europe, and North America.

    How It Works

    
    srt_cross_region
    
    
    The video captured live on-premises is sent to the studio in Shanghai using the SRT protocol.
    The studio processes the video and distributes the video to live streaming platforms using the SRT protocol.
    Live streaming platforms pull streams from StreamLink, or StreamLink pushes the stream to live streaming platforms.

    StreamLink Configuration

    The live stream needs to be sent to the studio in Shanghai. After processing the video, the studio needs to send the stream to different live streaming platforms.

    Creating an event

    
    create_event.png
    
    
    Create an event, so that all the flows used in this activity can be placed under this event for easy management and use.
    
    step_into_flow_mgr
    
    
    Click Flow management to configure the flows.

    Configuring flows to send the stream captured on-premises to the studio

    Given the high latency requirements of live events, the SRT protocol is used. To ensure source availability, two flows are created to transport the live video to the studio.
    Creating an SRT main flow
    
    select_region
    
    
    Because the event is taking place in Chengdu, select Chengdu as the region so that the input address is in the same region.
    Region: Select Chengdu, which is the Input region.
    Max bandwidth: Because the bitrate of the source video is high, 20Mbps is selected.
    Adding an input
    
    add_input_to_cd_main_src_flow
    
    
    Select a flow in the flow list, click Add input to add an input to the flow.
    
    create_input_of_cd_flow
    
    
    Input name: The input is named src_chengdu.
    Protocol type: Select SRT.
    Mode: Select Listener. The live video will be sent to StreamLink directly.
    Latency setting: The push end is in the StreamLink AZ used. In China, the RTT for same-city transport is usually less than 10 ms. Therefore, Latency is set to 60 ms. If the actual RTT is higher than expected, you can increase the latency at the push end.
    Decryption settings: Given that the push end uses a fixed IP address, instead of encryption, IP allowlist is used to ensure security.
    CIDR IP allowlist: Enter the IP address used by the push end. This ensures that only the device of the event can push streams to the flow.
    Click Save.
    Adding an output
    Because the studio is in Shanghai, we need to create an output in Shanghai. To keep the latency low, SRT is used for the output as well.
    
    add_output_to_cd_flow
    
    
    Output Name: The output is named shanghai_main_output.
    Output region: To keep the latency low, Shanghai is selected.
    Protocol type: Select SRT.
    Mode: Select Listener. The studio will pull the stream from StreamLink.
    Latency setting: The studio is in the StreamLink AZ used. In China, the RTT for same-city transport is usually less than 10 ms. Therefore, Latency is set to 60 ms. If the actual RTT is higher than expected, you can increase the latency at the push end.
    Enable encryption: Because the studio has a fixed IP address, instead of encryption, IP allowlist is used to ensure security.
    CIDR IP allowList: Enter the IP address of the studio. This ensures that only the studio's device can pull streams from StreamLink.
    Click Save.
    Creating an SRT backup flow
    The steps of creating a backup flow are the same as those for the main flow.

    Configuring a flow to send the stream from the studio to live streaming platforms

    After processing the video, the studio needs to distribute it to live streaming platforms. Because live streaming platforms normally do not have high requirements for latency, RTMP is used for the transport.
    Creating an RTMP failover flow
    
    create_sh_pgm_flow
    
    
    Because the studio is in Shanghai, select Shanghai as the region so that the input address is in the same region.
    Region: Select Shanghai, which is the input region.
    Max bandwidth: Because the bitrate of the processed video is lower, 10Mbps is selected.
    
    Protocol type: Select RTMP.
    Failover: Toggle this on.
    CIDR IP allowlist: Enter the IP address of the studio. This ensures that only the studio's device can push streams to the flow.
    Click Save.
    Adding an output
    Because the video will be distributed in the US, Europe, and China, we need to create at least one output for each of the three regions. Select RTMP_PULL as the output protocol, which means live streaming platforms will need to pull the stream from StreamLink. Each output allows the pulling of four streams at the same time. If more than one platform in a region pull streams from StreamLink at the same time, we recommend you create multiple outputs. For example, if two live streaming platforms in Europe will pull the stream from StreamLink at the same time, create two outputs so that the two platforms can use separate URLs. The following shows how to create such outputs.
    
    add_output_to_sh_pgm
    
    
    Output Name: The output is named eu_pgm_platform_a.
    Output region: Select Frankfurt, Germany.
    Protocol type: Select RTMP_PULL. Live streaming platforms will need to pull the stream from StreamLink.
    CIDR IP allowlist: Enter the IP address of the live streaming platform. This ensures that only the platform's device can pull streams from StreamLink.
    Click Save.

    Starting a flow

    
    start_flow
    
    
    When the event begins, start the flows in the StreamLink console.

    Obtaining the push and playback URL

    You can view the push URL on the flow page.
    Click Addresses.
    
    Obtain the push address from input source information.
    

    Dynamically changing the flow settings

    During live streaming, you can change the settings of a flow without stopping the flow.
    Modifying the input/output configuration:
    
    Deleting an output:
    
    Adding an output:
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support