Updated on 2024-05-11 GMT+08:00

Creating a Channel

Video can be played on Media Live only after a channel is created.

Prerequisites

Constraints

  • A tenant can create a maximum of 500 channels. To create more channels, submit a service ticket.
  • Except for channels whose input type is FLV_PULL, all other channels allow only one input stream and can output streams of multiple bitrates only after transcoding.
  • To ensure reliability, channels of the SRT_PUSH input type must be able to:
    • Support primary and standby URLs. The encoder needs to push streams to both the primary and standby URLs.
      • If the encoder supports streamid, only one input URL is returned by default, as shown in Figure 1.
        To push streams to both the primary and standby regions, submit a service ticket.
        Figure 1 Channel details
      • If the encoder does not support streamid, both the primary and standby input URLs are returned, as shown in Figure 2.
        Figure 2 Channel details
    • Resume stream push when the stream push by the encoder is interrupted. The recommended interval for resuming stream push is shorter than the duration of a segment.

Creating a Channel

  1. Log in to the Live console.
  2. In the navigation pane on the left, choose Media Live > Channel Management.
  3. Click Create Channel. The Create Channel page is displayed.

    Configure Basic Info as follows:

    • Channel Name: Set the channel name.
    • Channel ID: Set the channel ID.
    • AppName: Application name, which defaults to live and cannot be changed.

  4. Click Next.

    Configure parameters for adding inputs following Table 1.

    Table 1 Parameters

    Parameter

    Description

    Input Type

    Input type of a channel media file.

    Options:

    • FLV_PULL: Stream push is not required. The streaming URL provided by the user is directly obtained and used by Media Live to push streams to the origin server.

      The streaming URL supports only HTTP.

    • RTMP_PUSH: An ingest domain name needs to be configured for stream push.

    Input List

    Click Add Input. The Add Input dialog box is displayed.

    Configure the input list based on the selected input type:

    • If Input Type is set to FLV_PULL, configure the following parameters:
      • URL: Obtain the media stream URL from the channel provider. Media Live directly uses the URL to push streams to the origin server.
      • Then set Bandwidth (kbit/s). When Input Type is set to HLS_PULL, Bandwidth is unavailable.
      • Primary/standby Input: You can enable this function to set the standby media stream URL.
      • Standby Input URL: Obtain the standby media stream URL from the channel provider.
      • Switchover Duration Threshold: When the channel playback exception duration reaches the threshold, the system automatically switches to another URL for stream pull and playback.
      • You can set Priority Settings to PRIMARY (primary input URL) or EQUAL (switchover between primary and standby input URLs).
    • If Input Type is set to RTMP_PUSH, configure the following parameters:
      • Select the ingest domain name you added in Adding Domain Names from the drop-down list box.
      • Then set Bandwidth (kbit/s).

      After a channel is created, you can click Manage in the row where the channel is located to view the URLs in Input List.

      URL example: rtmp://live-push.example.com/live/huaweitest?request_source=ott&channel_id=huaweitest

  5. Click OK. The input list has been configured.
  6. Click Next.

    Table 2 shows Output Settings.

    Table 2 Parameters

    Item

    Parameter

    Description

    Transcoding

    Transcoding Template

    Select the Media Live transcoding template created in Creating a Transcoding Template from the drop-down list box. You can select multiple templates.

    Other

    Replay

    If this function is enabled, you need to set Max Replay Recording Time, that is, the duration of the historical recorded content that users can view.

    Unit: second.

    For details about how to obtain a replay URL, see Obtaining the Replay URL of a Channel.

    NOTE:
    • The OBS path for storing live recordings is OBS address/push_domain/AppName/Channelid.
    • After deleting channel A, use the ingest domain name, AppName, and channel ID of channel A to create channel B. If the recordings of channel A are not completely aged, the replay URL created by channel B can be used to view the recordings of channel A. The recordings of channel A cannot be viewed when they are completely aged.

    Output Segment Parameters

    Segment Duration

    Duration of a single segment. The default value is 4s. The value must be an integer multiple of the GOP duration.

    Output Group Settings

    NOTE:

    You can click on the right to add multiple output groups.

    Output Protocol

    Video transcoding output protocol.

    Options:

    Output Group Settings

    Segment Quantity

    Recommended:

    • HLS or DASH: The recommended value is 3, that is, three segments are returned.
    • MSS: The recommended value is 5, that is, five segments are returned.

    Distribution URL

    Set Distribution URL, select a streaming domain name from the first drop-down list box, and enter the streaming URL in the second drop-down list box.

    After the assembling is complete, a new streaming URL is generated.

    Streaming URLs whose output protocol is HLS, DASH, or MSS can be assembled. Examples:

    • HLS: http://live-play.example.com/live/huaweitest/index.m3u8
    • DASH: http://live-play.example.com/live/huaweitest/index.mpd
    • MSS: http://live-play.example.com/live/huaweitest.ism/manifest

    The preceding example URLs use HTTP. A streaming URL also supports HTTPS. If you want to use a URL starting with https://, configure an HTTPS certificate by referring to HTTPS Certificates.

    NOTICE:
    • If Input Type is set to RTMP_PUSH in 4, the region of the configured streaming domain name must be the same as the region of the ingest domain name configured in Input Type.
    • If Input Type is set to FLV_PULL in 4 and multiple output types are set, the regions of the streaming domain names of all output types must be the same.

    DRM Encryption

    Used to enable DRM encryption. This parameter is not displayed by default. You need to submit a service ticket to obtain the parameter configuration permission.

    To enable it, configure the following parameters:

    • DRM Type: DRM encryption type
    • DRM Vendor: DRM encryption service vendor
    • DRM Encryption Level: The encryption key needs to be obtained from the DRM vendor. Options:
      • content: One channel has one specific DRM key.
      • profile: Each stream of a channel has one specific DRM key.
    • DRM Content ID: content ID of DRM
    • KMS URL: URL for obtaining the DRM key
    • Token: token used to obtain the DRM key URL

  7. Click Finish. A new line of channel content is displayed on the channel management page.
  8. Click Start in the Operation column to start the channel.

Managing Channels

After creating a channel, you can perform the following operations as required:

  • Starting a channel

    After a channel is created, click Start in the Operation column to start the channel.

  • Stopping a channel

    To stop a channel, click Stop in the Operation column.

  • Deleting a channel

    To delete a channel, stop the channel and click Delete in the Operation column.

  • Modifying a channel

    To modify a channel, click Manage in the Operation column and modify the configuration items of the channel. If the channel to be modified has been started, the channel automatically restarts after the modification. The restart takes about 30 seconds. During the channel restart, media streams will be interrupted. After the channel is restarted, media streams automatically resume.