Recording

Live allows you to record a live stream and store the recordings in VOD. You can also transcode and extract audio from the recorded live stream on the VOD console. This function is available in CN North-Beijing1 only.

This function will not be optimized. You are advised to use the function for recording to OBS. For details, see Recording to OBS.

Process Flow

Figure 1 shows the process of recording live video to VOD.

Figure 1 Process of recording live video to VOD
  1. (Optional) Configure event notifications. If you want to know the recording status in real time, you can configure recording notifications before recording starts. If you do not need this, go to 2.
  2. Configure a recording template. The recording template in which AppName is the same as that in the ingest URL takes effect.
  3. Push a stream through an ingest URL and record the live stream based on a configured recording template. For details about how to create an ingest URL, see Assembling an Ingest URL.
  4. Manage recordings. You can view basic information about recordings and preview them on the Live console, and manage recordings, such as preview, publish, transcoding, and playback, on the VOD console.

Notes

  • Recording of source live streams using H.265 codec is not supported.
  • If stream pushing is interrupted due to network jitter during live recording, recording stops. When stream pushing restarts, recording restarts accordingly.
  • Recording starts when stream pushing starts and stops until stream pushing ends. Recording cannot be stopped or started during stream pushing. If the recording template is deleted during stream pushing, recording continues until stream pushing ends.
  • Ensure that the VOD service is not suspended due to arrears. Otherwise, recording will fail. You are advised to buy a VOD storage package.

Prerequisites

Pricing Notes

  • Live uses SMN to send notifications, which is billed by SMN. For details, see SMN Pricing Details.
  • Recordings are stored in VOD. Therefore, VOD charges you for storage. For details, see VOD Pricing Details.
    • Storage of recordings

      Billed by the actual size of recordings. If transcoding is configured, the storage fee is generated for both the source recording and transcoded recording.

    • Packaging of recordings

      This fee is generated only when Transcoding Format is set. After a recording is uploaded to the VOD system, the VOD system uses a packaging template to convert its format. If multiple formats are selected, you are billed for multiple outputs.

Step 1: Configure Event Notifications

Configure event notifications to get notifications about recording status.

Step 2: Configure a Recording Template

If you want to record a live stream for on-demand playback, configure a recording template. The recording template in which AppName is the same as that in the ingest URL takes effect.

  1. Log in to the Live console.
  2. In the navigation pane, choose Domains.
  3. Click Settings in the row containing the target ingest domain name.
  4. In the navigation pane, choose Template Settings > Recording.
  5. Click Create Template.
  6. Set recording parameters.
    Figure 2 Configuring a recording template
    • AppName: application name. The default value is live. You can customize the application name. Only letters, digits, underscores (_), and hyphens (-) are allowed.
    • Recording Format: The FLV format is supported.
    • Transcoding Format: VOD uses a packaging template to convert a recording to this transcoding format. This option is a billing item. You will be billed for packaging.
    • Storage Location is where recordings are stored. Select Video on Demand (VOD).
    • Recording Length ranges from 15 minutes to 360 minutes. After 6 hours, the system generates a new file based on the recording naming rule.
  7. Click OK.

    You can create multiple recording templates. The recording template in which AppName is the same as that in the ingest URL takes effect.

  8. Start to push streams.

    The resolution and bitrate of a recording are the same as those of a source live stream.

Step 3: Push Streams

Push a stream through an ingest URL and record the live stream based on a configured recording template. For details about how to create an ingest URL, see Assembling an Ingest URL. For details, see Getting Started.

Step 4: Manage Recordings

You can view the recordings on the Live and VOD console, or obtain the recordings by calling a VOD API.

If you have configured recording notifications, your subscription endpoints will receive a notification when the recording is complete. You can obtain the playback URL of the recording from the download_url field in your received message.

  • Manage recordings using the Live console.
    1. Log in to the Live console.
    2. In the navigation pane, choose Streaming Management > Recordings.
    3. Select a date, streaming domain name, and app name, and click Search.

      The recordings that you want to view are displayed.

      Figure 3 Viewing recording information

      Recording format: Record_Ingest domain name _AppName_StreamName_ Recording start time_Recording end time

      Example: Record_live.huaweitest.com_live/huawei_201808151856_201808151926

    4. Click in the Operation column to preview a recording.

      Recordings are stored in VOD. Previewing recordings will incur downlink traffic fees. For details, see VOD Pricing Details.

    5. Click to view details about a recording.

      You can view information such as the ID, recording type, duration, and playback URL.

      Figure 4 Viewing the details about a recording
  • Manage recordings using the VOD console.
    1. On the Audio and Video Management page of VOD console, click Advanced Search in the upper right corner to search for recordings by date or name keyword.
      Figure 5 Viewing recordings on the VOD console
    2. Click Details in the row containing the target recording. On the displayed page, you can transcode, categorize, add a thumbnail, and upload subtitles for the recording. For details, see VOD User Guide.
  • Obtain recordings by calling a VOD API.

    Call an API for querying media files and set query_string to Record_ to obtain details about recordings.