All Products
Search
Document Center

ApsaraVideo Live:Configure custom transcoding

Last Updated:Jul 25, 2023

This topic describes how to configure custom transcoding parameters such as resolutions, frame rates, and bitrates, for output streams based on your business requirements.

Procedure

  1. Log on to the ApsaraVideo Live console.
  2. In the left-side navigation pane, click Domains to go to the Domain Management page.
  3. Find the streaming domain that you want to configure and click Domain Settings.
    001
  4. Choose Templates > Transcoding Settings.

  5. Click the Custom tab. Then, click Add.

  6. Configure a transcoding template.

    The following table describes the parameters that you can configure for a transcoding template.

    Parameter

    Description

    Application Name

    The transcoding template takes effect only when the value of this parameter is the same as the application name that is specified in the ingest URL.

    Template ID

    The ID of the transcoding template.

    The value of the Template ID parameter is used to construct a URL for a live stream that requires transcoding. For information about how to construct a URL, see Ingest and streaming URLs. You can append the template ID to the streaming URL to watch the transcoded stream in the specified resolution.

    Important The template ID must be different from default transcoding template IDs. Default transcoding template IDs include lld, lsd, lhd, lud, ld, sd, hd, and ud.

    Transcoding Type

    Valid values: Narrowband HD™ and Audio Only.

    Audio-only transcoding templates are used to remove the video of an input stream and generate an audio-only stream.

    Trigger Transcoding

    • If you enable this feature, transcoding is triggered only when a stream is pulled for the first time.

    • If you disable this feature, transcoding is triggered whenever a stream is ingested, regardless of whether the stream is pulled.

    Video GOP

    The group of pictures (GOP) indicates the interval between two I-frames. The GOP size of the output stream must be smaller than or equal to the GOP size of the input stream. The GOP size of the output stream cannot exceed 3 seconds. This ensures low latency.

    Resolution

    The resolution of the output stream. Unit: pixels. You can set the Resolution parameter to Fixed or Source-based.

    Source-based: If the resolution of the source stream is smaller than the adaptive resolution, the output resolution is equal to the source resolution. If the resolution of the source stream is greater than the adaptive resolution, the output resolution is equal to the adaptive resolution. You can select one of the following adaptation methods:

    • Adaptive Height

    • Adaptive Width

    • Adaptive Resolution

    Fixed: The resolution that you specify. Different types of resolutions correspond to different prices. The following types of resolutions are supported:

    • Low definition (LD): 640 × 480 and lower

    • Standard definition (SD): 1280 × 720 and lower

    • High definition (HD): 1920 × 1080 and lower

    • 2K: 2560 × 1440 and lower

    • 4K: 3840 × 2160 and lower

    Note

    • Transcoding prices vary based on video resolutions, including LD, SD, HD, 2K, and 4K. The video resolutions are not indicated by regular transcoding template IDs, which contain letters such as lld, lsd, lhd, and lud, or Narrowband HD template IDs, which contain letters such as ld, sd, hd, and ud. Use these template IDs only for identification when you call services.

    • You cannot specify a custom resolution that is higher than 1080p in the console. If your business scenario requires a resolution of 2K or 4K, submit a ticket.

    The resolution of an output stream is determined based on the range where the width and height of the video fall.

    In the following example, the resolution of 1280 × 720 is used to show how the resolution of an output stream is determined:

    • If the width of the output video is less than or equal to 1,280 pixels and the height of the output video is less than or equal to 720 pixels, the resolution of the output video is SD.

    • If the width of the output video is greater than 1,280 pixels, or the height of the output video is greater than 720 pixels, the resolution of the output video is higher than SD.

    Video Bitrate

    Source-based: If the bitrate of the source stream is within the limit, the output bitrate is equal to the source bitrate. If the bitrate of the source stream exceeds the upper limit, the output bitrate is equal to the maximum bitrate. If the bitrate of the source stream is lower than the lower limit, the output bitrate is equal to the minimum bitrate. In addition, you can also specify a coefficient of the source bitrate to determine the output bitrate.

    Fixed: The bitrate that you specify. Unit: Kbit/s. The following list describes the bitrate ranges for different resolutions:

    • LD: 100 to 800 Kbit/s

    • SD: 200 to 1,500 Kbit/s

    • HD: 500 to 4,000 Kbit/s

    • 2K: 2,000 to 8,000 Kbit/s

    • 4K: 4,000 to 30,000 Kbit/s

    Video Frame Rate

    Source-based: If the frame rate of the source stream is within the limit, the output frame rate is equal to the source frame rate. If the frame rate of the source stream exceeds the upper limit, the output frame rate is equal to the maximum frame rate. If the frame rate of the source stream is lower than the lower limit, the output frame rate is equal to the minimum frame rate.

    Fixed: The frame rate that you specify. Unit: FPS. The frame rate of the output stream must be smaller than or equal to the frame rate of the input stream.

    Source-based Keyframe

    If you enable this feature, the keyframes of a transcoded stream are the same as the keyframes of its source stream.

    Source-based PTS

    If you enable this feature, the presentation timestamp (PTS) of a transcoded stream is the same as the PTS of its source stream.

    All SEI Passed-through

    If you enable this feature, all types of SEI messages can be passed through. If you disable this feature, only one type of SEI messages can be passed through.

    Encoding Standard (applicable to Audio Only)

    Only Advanced Audio Coding (AAC) is supported.

    Codec (applicable to Audio Only)

    • LC-AAC: advanced audio coding with low complexity. The transcoding efficiency is high.

    • HE-AAC: advanced audio coding with high efficiency. The sound effect for HE-AAC is better than that for LC-AAC when the audio bitrate is lower than 128 Kbit/s.

    Bitrate (applicable to Audio Only)

    The audio bitrate. Valid values: 8 to 1000.

    Channels (applicable to Audio Only)

    The number of audio channels. Valid values: 1 and 2.

    Video Encryption

    Specifies whether to enable digital rights management (DRM) encryption. Before you enable this feature, you must configure DRM encryption.

    Note This feature is supported only for streaming domains of the live center in the Singapore region. For more information, see Configure DRM encryption.

  7. Click OK.