Help Center/ Live/ Getting Started/ Media Live/ Pushing and Streaming Content on a PC with Media Live
Updated on 2025-12-31 GMT+08:00

Pushing and Streaming Content on a PC with Media Live

Media Live is a broadcast-grade livestreaming service that supports features such as channel management and content encryption, making it an ideal option for media and broadcasting. The following uses a simple example to describe how to push and stream content on a PC with third-party software.

Prerequisites

  • You have registered a HUAWEI ID, enabled Huawei Cloud services.
  • Domain names for Media Live are available. A PUSH channel requires an ingest domain name and a streaming domain name, and the two domain names must be different. A PULL channel does not require an ingest domain name.
  • When an IAM user uses Media Live for the first time, the user needs to be granted the permissions to create domain names.
  • You have created a channel.
  • You have installed a streaming tool (recommended: Open Broadcaster Software). If you have not installed it yet, download and install it.
  • You have installed a media player (recommended: VLC media player). If you have not installed it yet, download and install it.

Notes

  • Check the output resolution of Open Broadcaster Software (OBS).

    Pay attention to the input and output resolution levels configured in OBS and the resolution level configured in the live transcoding template of the channel to guarantee the playback.

    To view the input and output resolution levels of OBS, perform the following steps:

    1. Open OBS on the local PC.
    2. On the top navigation bar, choose File > Settings.
    3. In the navigation pane on the left, choose Video to view Base (Canvas) Resolution and Output (Scaled) Resolution.
      Figure 1 Video settings
  • Check the GOP duration of OBS following 3.

    You can set the GOP duration (recommended: 1–2 seconds) for OBS stream push. An excessively long GOP duration will compromise user experience when the I-frame interval of the source stream fluctuates greatly.

Adding Domain Names

Add your ingest and streaming domain names to Live. The following describes how to add an ingest domain name. The procedure for adding a streaming domain name is the same.

  1. Log in to the Live console.
  2. In the navigation pane, choose Domains.
  3. Click Add Domain. The Add Domain page is displayed on the right, as shown in Figure 1.

    For details about parameter settings, see Table 1.
    Figure 2 Adding an ingest domain name
    Table 1 Domain name parameters

    Parameter

    Example

    Description

    Domain name

    test-push.example.com

    Enter a second-level ingest domain name.

    If the message "Verify the domain ownership first" is displayed after you enter the domain name, click View Verification Methods on the right and handle the problem by referring to Verifying Domain Name Ownership.

    Enterprise Project

    -

    Retain the default value default.

    Subservice Type

    Media Live

    Select a subservice type of Live.

    Type

    Ingest domain name

    Select a domain name type.

    Live Origin Server

    EU-Dublin

    Select the region where the live origin server is located. The origin server for the ingest domain name must be in the same region as that for the streaming domain name.

    Service Area

    You do not need to set this parameter when adding an ingest domain name. When you add a streaming domain name, set this parameter to Europe.

    Select the region where the streaming domain name is accelerated.

    Stream Push Protocol

    RTMP

    Select the stream push protocol.

  4. Click OK. A domain name record is added to the Domains page.

    Wait for about 3 to 5 minutes. When Status changes to Normal, the domain name is added.

  5. Repeat step 1 to step 4 to add your streaming domain name.

Configuring CNAME Records

After domain names are added, a CNAME domain name is assigned to the ingest domain name and streaming domain name, respectively. Log in to the Live console and view the domain names on the Domains page, as shown in Figure 3.

Then, configure the CNAME records at the DNS service provider. For details, see Configuring CNAME Records. After the CNAME records take effect, all requests to your ingest domain name and streaming domain name are redirected to Huawei Cloud CDN nodes, enabling faster livestreaming.

Figure 3 Domains

Pushing Streams

  1. Obtain the ingest URL.

    1. Log in to the Live console.
    2. In the navigation pane on the left, choose Channels under Media Live. The Channels page is displayed.
    3. Find the desired channel and click Manage on the right. The Update Channel page is displayed.

      The ingest URL is required only when Input Type is set to RTMP_PUSH or SRT_PUSH. If FLV_PULL, HLS_PULL, or SRT_PULL is selected, 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.

      An example of the ingest URL is shown in Figure 4.

      SRT_PUSH channels and RTMP_PUSH channels cannot be created at the same time for one domain name.

      • RTMP_PUSH URL example: rtmp://live-push.example.com/live/huaweitest?request_source=ott&channel_id=huaweitest
      • SRT_PUSH URL example: srt://live-srt-push.example.com:5000?streamid=#!::h=push.bj4.srt.transcodeonline.com,r=live/srtpush,request_source=ott,channel_id=srtpush,m=publish
      Figure 4 Viewing the ingest URL

  2. Run OBS and click Settings in the lower right corner.

    Figure 5 Settings

  3. In the navigation pane on the left, choose Output. Set Output Mode to Advanced and Keyframe Interval to 2.

    Figure 6 Output settings

  4. In the navigation pane on the left, choose Stream and enter the ingest URL obtained in 1.

    Figure 7 Livestream settings

    The ingest URL consists of two parts: Server and Stream Key.

    The parameter names on the GUI may vary depending on the OBS version, but the rules for configuring the parameters are the same.

    Rules for setting an RTMP_PUSH ingest URL:
    • Server: Enter the part from the beginning of the ingest URL to the AppName, for example, rtmp://live-push.example.com/live/
    • Stream Key: Enter the URL containing StreamName, for example, huaweitest?request_source=ott&channel_id=huaweitest

    Rules for setting an SRT_PUSH ingest URL:

    • Method 1:
      • Server: Enter a server URL, for example, srt://live-srt-push.example.com:5000
      • Stream Key: Enter the URL following streamid=, for example, #!::h=push.bj4.srt.transcodeonline.com,r=live/srtpush,request_source=ott,channel_id=srtpush,m=publish
    • Method 2:
      • Server: Enter a complete URL, for example, srt://live-srt-push.example.com:5000?streamid=#!::h=push.bj4.srt.transcodeonline.com,r=live/srtpush,request_source=ott,channel_id=srtpush,m=publish
      • Stream Key: Leave it empty.

  5. Click OK.
  6. Click + in the lower left corner of the Sources area and add a stream source.

    Figure 8 Source settings
    • Media Source indicates local media files.
    • Video Capture Device indicates a camera. If a camera is available on the PC, the camera is directly enabled.

  7. Click Start Streaming in the lower right corner.

Streaming Content

  1. Obtain the streaming URL.

    1. Log in to the Live console.
    2. In the navigation pane on the left, choose Channels under Media Live. The Channels page is displayed.
    3. Find the desired channel and click Manage on the right. The Update Channel page is displayed.

      View the streaming URL, as shown in Figure 9. Streaming URLs whose output protocol is HLS, DASH, or MSS can be assembled. Examples:

      • HLS: https://live-play.example.com/{channelld}/hls/{unique_string}/index.m3u8
      • DASH: https://live-play.example.com/{channelId}/dash/{unique_string}/index.mpd
      • MSS: https://live-play.example.com/{channelId}/mss/{unique_string}.ism/Manifest

      The streaming URL supports HTTPS. You need to configure an HTTPS certificate by referring to HTTPS Certificates.

      Figure 9 Viewing the streaming URL

  2. Run VLC.
  3. On the menu bar, choose Media > Open Multiple Files.
  4. In the displayed dialog box, enter the streaming URL obtained in 1. Click Play.