This topic describes how to configure real-time streaming (RTS) transcoding.
- Videos that contain B-frames are not supported. Otherwise, frame skips may occur.
- ApsaraVideo Player SDK for HTML5 cannot be used to play audio streams that are encoded in the Advanced Audio Coding (AAC) format. Otherwise, noise may occur.
When you use the RTS feature, we recommend that you remove B-frames from the input stream to be ingested. If you need to modify the configuration of the input stream, you can use an RTS transcoding template. For example, you can use an RTS transcoding template to modify the resolution, frame rate, bitrate, and audio coding format of the input stream. You can also specify whether to remove B-frames from the input stream.
- Log on to the ApsaraVideo Live console.
- In the left-side navigation pane, click Domains to go to the Domain Management page.
- Select the streaming domain that you want to configure and click Domain Settings.
- Choose .
- Click the RTS Transcoding tab. Then, click Add.
- Configure a transcoding template.
The following table describes the parameters that you can set to configure the 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 Type Valid values: Standard, Narrowband HD™, Original Quality Template, and Audio Only.
Standard transcoding templates and Narrowband HD™ transcoding templates vary in transcoding quality and performance, and are charged at different prices. Original quality templates do not modify the configuration of videos. Audio-only transcoding templates remove the video of the input stream and generate an audio-only stream in the Opus format.
Resolution The resolution of the output stream. Unit: pixels. Different types of resolutions correspond to different prices. The following types of resolutions are supported:
Note Custom transcoding is charged based on the resolutions, not the template IDs for standard templates and Narrowband HD™ templates of default transcoding. The resolutions include LD, SD, HD, 2K, and 4K. The template IDs for standard templates include lld, lsd, lhd, and lud. The template IDs for Narrowband HD™ templates include ld, sd, hd, and ud.
- 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
The resolution of an output stream is determined based on the range where the long side and short side of the video image fall.For example, to determine whether the resolution of an output stream is 1280 × 720, which is SD:
- If the long side of the video image contains no more than 1,280 pixels and the short side of the video image contains no more than 720 pixels, the resolution of the output stream is SD.
- If the long side of the video image contains more than 1,280 pixels, or the short side of the video image contains more than 720 pixels, the resolution of the output stream is higher than SD.
Video Bitrate The bitrate that corresponds to the resolution. Unit: Kbit/s. The following types of resolutions correspond to different bitrate ranges:
- LD: 100–800 Kbit/s
- SD: 200–1,500 Kbit/s
- HD: 500–4,000 Kbit/s
- 2K: 2,000–8,000 Kbit/s
- 4K: 4,000–30,000 Kbit/s
Video Frame Rate The frame rate of the output stream. The frame rate of the output stream must be smaller than or equal to the frame rate of the input stream. Video GOP The group of pictures (GOP) indicates the interval between two I-frames. The GOP of the output stream must be smaller than or equal to the GOP of the input stream. To ensure low latency, the GOP of the output stream cannot exceed 3 seconds. B-frame Removal If you turn on B-frame Removal, the output stream contains no B-frames. Opus Transcoding If you turn on Opus Transcoding, the output audio stream is encoded in the Opus format with a sampling rate of 48 kHz. Trigger Transcoding
- If you turn on Trigger Transcoding, transcoding is triggered only when a stream is pulled for the first time.
- If you turn off Trigger Transcoding, transcoding is triggered whenever a stream is ingested, no matter whether the stream is pulled.
Settings ID The ID of the transcoding template.
The value of the Settings ID parameter is used to construct a URL for a live stream that requires transcoding. For more information about how to construct a URL, see Ingest URL and Streaming URLs. You can append the template ID to the streaming URL to watch the transcoded stream with the specified resolution.Notice The template ID must be different from default transcoding template IDs. The default transcoding template IDs include lld, lsd, lhd, lud, ld, sd, hd, and ud.
- Click OK.