tencent cloud

Feedback

Setting up Live Streaming Service with SRS Application Template

Last updated: 2024-03-20 14:40:12

    Overview

    SRS is a simple and efficient real-time video server that supports RTMP, WebRTC, HLS, HTTP-FLV, and SRT/GB28181.
    Lighthouse provides SRS application images, enabling you to easily set up live streaming service without complicated deployment operations.
    HTTP-FLV plays the best role in the scenario of interactive live streaming (such as live streaming e-commerce), while HLS is more applicable in some latency-insensitive scenarios such as general live streaming.

    Directions

    Creating a Lighthouse Instance Using SRS Application Image

    1. Log in to the Lighthouse console. On the Instances page, click Create.
    2. On the Lighthouse purchase page, purchase a Lighthouse instance with needed configurations selected. For image configuration, select Application image > SRS 4.2. Configure other parameters as instructed in Purchase Methods.
    Note:
    To set up live streaming service using a created instance, you can use the SRS application image to reinstall system.
    In this example, we uses SRS 4.2. Note that the image may undergo version upgrades and updates. The actual version on the purchase page shall prevail.

    Configuring an Instance

    1. On the Instances page, select the target instance, and enter its details page.
    2. Select the Firewall tab, click Add rule, and open port 1935.
    
    
    3. Select the Pre-installed application tab, click Access address in Pre-installed software to enter the SRS admin page.
    
    
    4. Set the admin password as instructed by prompts and keep it private when entering the SRS admin page for the first time.
    5. 
    Log in to the SRS admin page
    , and record the OBS push address and key.
    
    

    Installing and Configuring OBS Push Software

    1. In this example, the push via OBS is adopted. Please download and install OBS Studio.
    2. Run OBS. The OBS interface displays the following items:
    
    
    2.1 Scenes
    2.2 Scene Collection
    2.3 Sources
    2.4 Audio Mixer
    2.5 Controls To learn more about OBS, see OBS official website.
    3. Select File > Settings on the top left corner of the interface.
    4. Select Push on the left sidebar, and configure the following:
    
    
    Service: Select Custom from the drop-down list.
    Service: Enter the URL obtained in Step 5 for push via OBS.
    Stream Key: Enter the stream key obtained in Step 5.
    5. Click OK.
    6. Select Media Source in Sources settings on the main interface, and click Start Streaming under the Controls column.
    
    
    7. In the Create or Select Source pop-up window, create or select a source as required, and click OK.
    8. In the Properties for 'Media Source' pop-up window, select the content to be pushed or (for live streaming). In this example, a local video resource is selected.
    
    
    9. Click OK to upload and start streaming. You can right-click the screen in OBS to adjust the scene size and view orientation of the live streaming in real time.
    
    

    Viewing Live Streaming

    1. Go to the Instances page in the console, and enter the details page of the target SRS instance.
    2. Select the Pre-installed application tab, click Access address in Pre-installed software to enter the SRS admin page.
    3. Click HTTP-FLV by H5 or HLS by H5 as shown in this example to view the live streaming scene.
    
    The live streaming scene is shown below:
    
    
    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