tencent cloud

Feedback

SDK Integration

Last updated: 2022-03-17 10:34:09

    As a lower-latency version of LVB, LEB provides superb live streaming experience with millisecond playback latency, far lower than that of live stream playback using traditional protocols.
    Before you use LEB, please read LEB Billing Overview to learn about its billable items and pricing.

    Note:

    LEB uses the WebRTC protocol to ensure low latency. It adopts the Opus codec and does not support B-frames. If the original stream contains B-frames or the codec is not Opus, the CSS backend will remove the B-frames and transcode the stream to Opus format, which will incur standard transcoding fees.

    Integration into App

    Directions

    You can integrate the MLVB SDK into your iOS or Android app to implement the live push and playback features.

    • Live push on apps: Supports capturing camera video or mobile phone screens and then pushing the content to the CSS platform using the RTMP protocol. For details, see Publishing from Camera and Publishing from Screen.
    • Live playback on apps: Supports the WebRTC playback protocol. You can use the MLVB SDK, which integrates LEB, to quickly enable playback with ultra-low latency on mobile apps. For details, see Playback > LEB.
    Note:

    The MLVB SDK uses CSS, IM, TRTC, and other services for low-latency audiovisual communication for multiple parties. Participants can interact with each other through mic connect while others watch. For details, see Mic Connect.

    Free demo

    TCToolkit is an open-source and comprehensive audio/video solution developed by Tencent Cloud. You can use it to try out LEB’s capability to play live streams with millisecond latency.

    Platform
    Demo
    Push Demonstration (Android)
    Playback Demonstration (Android)
    Android
    iOS

    Integration into Webpage

    Directions

    You can use the following ways to achieve live push and playback on your websites:

    • Live push on web: The push component is designed and packaged according to the WebRTC standard, which is supported by most browsers. You can enable the live push feature simply by importing the code we provide. For details, see WebRTC Push.
      Note:

      • WebRTC push uses the Opus audio codec. If you use an LVB protocol (RTMP, HTTP-FLV, or HLS) for playback, the CSS backend will automatically convert audio to AAC format to ensure normal playback, which will incur audio transcoding fees. For details, see Live Transcoding > Audio Transcoding. If only LEB is used, the CSS backend will not transcode the audio.
      • With WebRTC, each push domain name can be used for up to 100 concurrent streams by default. If you want to push more streams, please submit a ticket.

    Free demo

    • Live push on web: You can test the web push feature in CSS console > Web Push.

    • Live playback on web: You can use WebRTC Live Demo to test playback.

      Note:

      • Both live push and playback on web use the standard WebRTC protocol. Web push does not generate B-frames, and audio is encoded in Opus format, so there will be no costs of audio transcoding or B-frame removal.
      • WebRTC Live Demo supports multi-definition playback. You can create a transcoding template for HD and SD output in Feature Configuration > Live Transcoding in the CSS console, enter in the demo a WebRTC stream URL containing the transcoding template, and test its playback. If you don't need to test transcoding, enter the original URL of the WebRTC stream.
      • For more information on live transcoding and its billing, see Live Transcoding.

    WebRTC Push Integration via OBS

    Push over the WebRTC protocol is mainly used for LEB (ultra-low-latency live streaming). It pushes live audio/video or video files to the CSS server through the WebRTC protocol. The following describes how to use OBS to implement WebRTC push.

    Notes

    • Your OBS version must be v26 or above.
    • We only offer an OBS plugin for Windows currently. If you want to use OBS to implement the WebRTC push feature on macOS, see Integration into Webpage.

    Configuring OBS plugin

    1. Configure the plugin data
      Download the OBS plugin, copy the services.json and package.json files in the data directory and use them to replace the corresponding files in obs-studio > rtmp-service > data. (obs-studio is installed in C:\Program Files\ by default.)
    2. Configure the plugin's dynamic library
      Move the DLL and PDB files in obs-plugins\64bit to obs-studio > obs-plugins > 64bit. (obs-studio is installed in C:\Program Files\ by default.)

    Configuring push URL

    1. Generate a WebRTC push address.

    2. Log in to the CSS console and go to CSS Toolkit > Address Generator to generate a push URL. For detailed directions, see Address Generator.

    3. Change the rtmp prefix in the URL generated to webrtc. For details, see Splicing Live Streaming URLs.

    4. Configure push in OBS

    5. Open OBS and click Controls > Settings at the bottom to enter the settings page.

    6. Click Stream, select Tencent webrtc for Service and Default for Server, enter the generated WebRTC push URL in Stream Key, and append to it &stopstream_api=https://webrtcpush.myqcloud.com/webrtc/v1/stopstream.

      Sample stream key:

      webrtc://domain/AppName/StreamName?txSecret=xxx&txTime=xxx &stopstream_api=https://webrtcpush.myqcloud.com/webrtc/v1/stopstream 
      

    As shown below:

    LEB playback

    For how to use the MLVB SDK for LEB playback, see Playback > LEB.

    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