Creating a Transcoding Template
You can transcode livestreams into video streams with different resolutions and bitrates to meet a broad range of requirements. You can customize a transcoding template. When a channel is created, a transcoding template is configured. When channel content is played, transcoding is performed based on the transcoding template.
Function Overview
The transcoding function allows you to:
- Transcode source audio and video into one or more formats for playback on a wide range of devices.
- Adapt the output bitrate to different network bandwidths.
- Reduce the costs of distributing livestreams. Low-bitrate HD can reduce the bitrate usage by about 20% at the same resolution.
- Customize transcoding templates, such as the transcoding type, video bitrate, resolution, frame rate, and GOP duration.
For details about the function implementation, see Multi-bitrate Adaptation of Media Live.
Notes
- To delete a transcoding template, you need to manually delete it from all channels. Otherwise, the transcoding template still takes effect on the channels.
- The transcoding template of a channel takes effect when the channel playback starts. If the transcoding configuration is modified, the modification takes effect only after the channel is restarted.
- If low-bitrate HD is selected in the transcoding template, live transcoding is billed according to the low-bitrate HD billing standard. For details, see Live Pricing Details.
- Upsampling transcoding is not supported, that is, the resolution and frame rate of transcoded outputs cannot be higher than those of the source stream. Even if you specify a resolution higher than the source stream in the template, the streaming URL generated for transcoded streams will be functional, but the streams will still be played at the original resolution. Upsampling is not supported for the frame rate either.
- In the EU-Dublin region, submit a service ticket for review after configuring a template. The configuration takes effect only after it is approved.
Prerequisites
- An ingest domain name has been added.
- CNAME records have been configured at your domains' DNS provider.
Adding a Media Live Transcoding Template
You can add a Media Live transcoding template on the Live console.
- Log in to the Live console.
- In the navigation pane, choose Media Processing > Live Transcoding under Media Live.
- Click Create Transcoding Template. The Transcoding page is displayed on the right, as shown in Figure 1.
Configure transcoding parameters as instructed by Table 1.
Table 1 Transcoding settings Parameter
Description
Template Name
Name of a Media Live transcoding template.
You can customize the name in letters, digits, and hyphens (-).
Triggered By
Transcoding is triggered by stream push.
Transcoding Type
Transcoding type of Media Live.
Options:
- Standard transcoding
- Low-bitrate HD
For the same resolution, low-bitrate HD transcoding consumes 20% less bitrate than standard transcoding but costs more.
Low-bitrate HD transcoding means achieving the same image quality at a lower output bitrate. If you enable this function, you will be billed based on the rates of low-bitrate HD transcoding. For details, see Live Pricing Details.
Video Encoding
Supported video encoding formats:
- H.264
- H.265
NOTICE:
- Only one encoding format can be selected for a channel.
- H.265 is displayed only when Input Type of a created channel is set to SRT_PUSH, HLS_PULL, SRT_PULL, or STREAM_CONNECT.
Presets (Optional)
Resolution levels:
- 360p
- 540p
- 720p
- 1080p
- 1440p
- Custom
Select a level to see preset values for Video Bitrate and Resolution (W x H) below. Change them as needed.
Video Bitrate
Average bitrate of the transcoded video, in Kbit/s.
Value range: 40 to 30,000
Bitrate Control
Bitrate control policy.
Options:
- Disabled: Bitrate adaptation is disabled. The target bitrate is output as specified.
- Not higher than source stream: The target bitrate is the smaller value between the specified bitrate and the bitrate of the source file.
- Adaptive to source stream: The target bitrate is adaptive to the bitrate of the source file.
Default value: Disabled
Resolution (W x H)
Width and height of the video, in pixel.
If the input value of both sides is set to 0, the video is output using the resolution of the source stream. If the value of one side is set to 0, the value of that side will be converted proportionally according to the input value of the other side.
Value range:
- Width: The value must be 0 or a multiple of 2 between 32 and 3,840.
- Height: The value must be 0 or a multiple of 2 between 32 and 2,160.
NOTICE:
- The transcoded output resolution cannot be higher than the input resolution.
Video Frame Rate
Frame rate of the transcoded video.
Options:
- Retain the original
- Set a new one: If you select this option, you need to enter the frame rate. The value ranges from 0 to 60. 0 means adaptive frame rate.
The output frame rate cannot exceed the input frame rate. If a higher output frame rate is specified, the system defaults to using the source stream's frame rate.
B-Frame Removal
After this function is enabled, the transcoded video does not contain B-frames.
- Click OK.
There is a new transcoding template on the Live Transcoding page.
Managing Transcoding Templates
You can perform the following operations on your transcoding template:
- Editing a transcoding template
Click Edit in the Operation column to modify parameters in the template. If the channel where the transcoding template is located has been started, you need to restart the channel for the modification to take effect. It takes about 30 seconds to restart the channel. During the channel restart, transcoding will be interrupted. After the channel is restarted, transcoding automatically resumes.
- Deleting a transcoding template
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.
