Skip to main content

Start Broadcast Streaming using a custom domain

This page shows how to start Broadcast Streaming using a custom domain.

Understand Broadcast Streaming modes

When using a custom domain, Broadcast Streaming provides two modes for you to build live streaming experiences:

Push CDN modePull CDN mode
How it worksYou push streams to the Broadcast Streaming servers, and the Broadcast Streaming servers deliver the content to your audience.The Broadcast Streaming servers pull streams from your origin server and deliver the content to your audience.
Applicable scenarioNo origin server is requiredAn origin sever is required
How to configure itGo to Agora Console. See Configure Push CDN mode.
  • If you use a relatively fixed domain name, add it on Agora Console. See Configure Pull CDN mode.
  • If you needs more flexibility, contact support@agora.io and provide a URL address, so that Agora can send a request to get your domain name before pulling streams.
  • Prerequisites

    Before proceeding, ensure that you meet the following requirements:

    Configure Broadcast Streaming modes

    To configure your Broadcast Streaming mode, follow these steps:

    1. Configure either Push CDN mode or Pull CDN mode in Agora Console.
    2. Finish CNAME configuration.
    If you need domain names for testing purposes, or if you need domain names provided by Agora that you can use in the production environment, contact support@agora.io.

    Configure Push CDN mode

    Follow these steps to configure Push CDN mode:

    1. Click the Config button for Fusion CDN to enter the configuration page.
    2. Click Push CDN on the top of the page.
    3. Add a stream-pushing domain:
      1. Click Add.
      2. Fill in your domain name for stream pushing, and select a region from the dropdown menu.
      3. Click Create. By default, support for RTMPS is disabled, and the certificate and authentication information is blank. To edit these settings, click the icon.
    4. Add a playback domain:
      1. Click Add.
      2. Fill in your domain name for stream playback, and select a region from the dropdown menu.
      3. Click Create. By default, support for HTTPS and cross-domain configuration is disabled, and the certificate and authentication information is blank. To edit these settings, click the icon.
    5. (Optional) Add an SSL certificate:
      1. Click Add.
      2. Create a name for the certificate.
      3. Upload your certificate (.pem or .crt) and key (.key) files.
      4. Click Save.
    6. (Optional) Configure the Agora Message Notification service for Broadcast Streaming events:
      1. Turn on the switch.
      2. Fill in your callback address to receive the message notifications.
      3. Click Save.
      4. Contact support@agora.io to enable the Agora Message Notification service.

    Configure Pull CDN mode

    Follow these steps to configure Pull CDN mode:

    1. Click the Config button for Fusion CDN to enter the configuration page.
    2. Click Pull CDN on the top of the page.
    3. Add the source domain:
      1. Turn on the switch
      2. Fill in the domain name of your origin server.
      3. Click Save.
    4. Add a playback domain:
      1. Click Add.
      2. Fill in your domain name for stream playback, and select a region from the dropdown menu.
      3. Click Create. By default, support for HTTPS and cross-domain configuration is disabled, and the certificate and authentication information is blank. To edit these settings, click the icon.
    5. (Optional) Add an SSL certificate:
      1. Click Add.
      2. Create a name for the certificate.
      3. Upload your certificate (.pem or .crt) and key (.key) files.
      4. Click Save.
    6. (Optional) Configure the Agora Message Notification service for Broadcast Streaming events:
      1. Turn on the switch.
      2. Fill in your callback address to receive the message notifications.
      3. Click Save.
      4. Contact support@agora.io to enable the Agora Message Notification service.

    Finish CNAME configuration

    Once you add a stream-pushing or playback domain name when configuring Push CDN mode or Pull CDN mode, Agora automatically assigns it a CNAME ("canonical name") suffixed with .v1.agoramdn.com. To use your custom domain name for live streaming, you need to add its CNAME to your domain's DNS settings, so that your domain name points to the CNAME. For details, refer to your DNS provider's instructions.

    Implement Broadcast Streaming

    Step 1: Construct the URL for pushing a live stream

    Agora supports both sRTMP and RTMPS. For details, see Construct the URL for pushing a live stream.

    Step 2: Push the live stream

    To push an RTMP/RTMPS stream, you can choose one of the following methods:

    Step 3: Construct the URL for playing the live stream

    Agora supports RTMP, HTTP-FLV, and HLS. For details, see Construct the URL for playing a live stream.

    To get a playback URL that supports HTTP-based adaptive bitrate streaming (ABR), contact support@agora.io.

    Step 4: Play the live stream

    Use the Agora MediaPlayer Kit or your own player to play the live stream.

    Next steps

    After implementing Broadcast Streaming, you can add the following live streaming functions through the Broadcast Streaming RESTful API:

    Page Content