tencent cloud

Feedback

Creating Recording Template

Last updated: 2023-12-23 12:07:33
    LVB supports recording live streams and storing recording files in VOD for download and preview. This document describes how to create, bind, unbind, modify, and delete recording templates. You can create a recording template in either of the following two methods:
    Create a recording template in the LVB console. For detailed directions, please see Creating Recording Template.
    Create a recording template with APIs. For specific parameters and samples, please see CreateLiveRecordTemplate.

    Notes

    The recorded video files are stored in the VOD console by default. We recommend you activate the VOD service in advance. For more information, please see Getting Started with VOD.
    After enabling the recording feature, please make sure that your VOD service is in normal status; if it has not been activated or has been suspended due to account arrears, LVB recording will not be available, no recording files will be generated, and no recording fees will be incurred.
    During the live streaming, you can get a recording file in about 5 minutes after the recording process ends. For example, if you start recording a live stream at 12:00, you can get the corresponding clip for 12:00 to 12:30 at around 12:35.
    Subject to the audio and video file formats (FLV/MP4/HLS), the video encoding format of H.264 and audio encoding format of ACC are supported.
    After a recording template is created successfully, it can be bound to a push domain name. For more information, please see Recording Configuration. The binding will take effect in about 5–10 minutes.
    For the naming rules of generated recording files, please see VodFileName.
    Binding, unbinding, and modifying a template affect only new live streams after the update but not ongoing ones. To make the new rule take effect for ongoing live streams, you need to interrupt them and push them again.
    Stream mix-based recording does not support mixing streams in and outside Chinese mainland, as recording file errors will occur and affect normal playback.

    Prerequisites

    You have activated the LVB service and added a push domain name.
    You have activated the VOD service.

    Creating Recording Template

    1. Log in to the LVB console and select Feature Configuration > LVB Recording.
    2. Click Create Recording Template to set template information and configure as follows:
    
    
    Configuration Item
    Configuration Description
    Default Template
    Default template type for LVB recording, which can be FLV, MP4, or HLS.
    Template Name
    Custom LVB recording template name, which can contain letters, digits, underscores (_), and hyphens (-).
    Template Description
    Custom LVB recording template description, which can contain letters, digits, underscores, and hyphens.
    Recording File Type
    Videos are recorded based on the original bitrate of the live stream and can be output in .hls, .mp4, .flv, and .aac formats. The .aac format records the audio only.
    Single File Duration (min)
    
    There is no upper limit for .hls format. After the resuming timeout period elapses, a new file will be created to continue recording.
    
    The length of a single file recorded in .mp4, .flv, or .aac format ranges from 5 to 120 minutes.
    
    Retention Period (day)
    A single recording file can be retained for up to 1,080 days. A retention period of 0 means "never expire".
    Resuming Timeout (sec)
    Only the .hls format supports recording resumption after push interruption, and the timeout period for resumption can be set between 0 and 1,800 seconds.
    Recording to Subapplication
    Live streams can be recorded to a specified subapplication in VOD. They are recorded to the primary application under the account by default. Only writable subapplications are supported.
    3. Click Save.

    Binding Domain Name

    1. Log in to the LVB console and select Feature Configuration > LVB Recording.
    Directly bind a domain name: click Bind Domain Name in the top-left corner.
    
    
    Bind a domain name after creating a recording template: after successfully creating a recording template, click Bind Domain Name in the pop-up.
    
    
    2. Select a recording template and a push domain name in the domain name binding window and then click OK.
    
    
    Note:
    You can click Add to bind multiple push domain names with this template.

    Unbinding

    1. Log in to the LVB console and select Feature Configuration > LVB Recording.
    2. Select the recording template bound to the domain name and click Unbind.
    
    
    3. Confirm whether to unbind the domain name and click OK to unbind it.
    
    
    Note:
    Unbinding the recording template will not affect ongoing live streams.
    To make the unbinding take effect, interrupt ongoing live streams and push them again. The new live streams will not generate recording files.

    Modifying Template

    1. Go to Feature Configuration > LVB Recording.
    2. Select the target recording template and click Edit on the right to modify the template information.
    3. Click Save.
    
    
    

    Deleting Template

    1. Go to Feature Configuration > LVB Recording.
    2. Select the target recording template and click
    
    above.
    3. Confirm whether to delete the selected recording template and click OK to delete it.
    
    
    Note:
    If the template has been bound with a domain name, you need to unbind the template before deleting it.
    The recording templates are managed at the domain name level in the console, and rules created by APIs cannot be canceled there for the time being. If you bound the recording configuration to a specified stream through the recording management API and want to unbind them, you need to call the DeleteLiveRecordRule API.

    Relevant Operations

    For more information on how to bind/unbind a domain name to/from a recording template, please see Recording Configuration.

    FAQs

    How are videos generated by LVB recording named?

    Recording files generated by the callback of a recording template created in the console are named in the following format by default: {StreamID}*{StartYear}-{StartMonth}-{StartDay}-{StartHour}-{StartMinute}-{StartSecond}*{EndYear}-{EndMonth}-{EndDay}-{EndHour}-{EndMinute}-{EndSecond}
    Among them:
    Placeholder
    Description
    {StreamID}
    Stream ID
    {StartYear}
    Start time - year
    {StartMonth}
    Start time - month
    {StartDay}
    Start time - day
    {StartHour}
    Start time - hour
    {StartMinute}
    Start time - minute
    {StartSecond}
    Start time - second
    {EndYear}
    End time - year
    {EndMonth}
    End time - month
    {EndDay}
    End time - day
    {EndHour}
    End time - hour
    {EndMinute}
    End time - minute
    {EndSecond}
    End time - second
    
    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