Custom Templates
In addition to the presets, you can customize one-in one-out transcoding templates based on your needs.
- Log in to the MPC console.
- In the navigation pane, choose Global Settings > Custom Templates.
- Click Custom Templates.
- Set Basic Information by referring to Figure 1 and Table 1.
Table 1 Basic information Parameter
Description
Template Name
Enter a maximum of 128 characters. Only letters, underscores (_), and digits are allowed.
Example: MP4_H264
Output Format
Format of an output audio or video file.
The following output formats are supported:
- Video formats: MP4, HLS, DASH, DASH+HLS, and TS
- Audio formats: ADTS and MP3
Note: If you select Audio only, the video parameters are disabled and only audio is transcoded.
- Configure video parameters by referring to Figure 2 and Table 2.
If Audio only is selected, the output file does not contain any video information. This option applies to the scenario where audio is extracted from a media file. Perform 6 to set audio parameters.
Table 2 Video parameters Parameter
Description
Video Codec
The H.264 and H.265 formats are supported.
Low Bitrate HD (PVC)
Whether to enable low bitrate HD. The function is disabled by default. If this function is enabled, the output bitrate is about 20% lower than the configured bitrate, and the transcoding fee will be charged based on the low bitrate HD standard. For details, see MPC Pricing Details.
HLS Segment Duration
Duration of an HLS segment. This parameter is only used when Output Format is set to HLS or DASH+HLS.
The value ranges from 2 to 10, in seconds. The default value is 5.
Dash Segment Duration
Length of a dash segment. This parameter is only used when Output Format is set to DASH or DASH+HLS.
The value ranges from 2 to 10, in seconds. The default value is 5.
Width (Unit: px)
Width of an output video.
Value range:- If H.264 is selected for Video Codec, the value can be 0 or a multiple of 2 from 32 to 4,096.
- If H.265 is selected for Video Codec, the value can be 0 or a multiple of 2 from 160 to 4,096.
Unit: pixel
Height (Unit: px)
Height of an output video.
The value can be 0 or a multiple of 2 from 160 to 2,880.
Unit: pixel
Bitrate (Unit: kbit/s)
Bitrate of an output video.
The value can be 0 or a number from 40 to 30,000.
Unit: kbit/s
You are advised to set it to a recommended value. For details, see Table 3. If Bitrate is set to 0, the recommended bitrate is used.
Maximum I-Frame Interval
Maximum interval between I-frames (initial frames) during video encoding.
The value ranges from 2 to 10, in seconds. The default value is 5.
Maximum Consecutive B-Frames
Maximum number of frames between B-frames (middle frames) during video encoding. The maximum number of consecutive B-frames significantly influences video encoding results.
The recommended value is 4 for H.264, and 7 for H.265. A value of 0 disables B-frames, resulting in a lower compression ratio.
Value range:- For H.264, the value ranges from 0 to 8, and the default value is 4.
- For H.265, the value ranges from 0 to 8, and the default value is 7.
Profile
Video encoding level, which is related to the video codec.
For H.264, three profiles are available to support different devices.
- VIDEO_PROFILE_H264_BASE: provides baseline image quality optimized for mobile devices. It is recommended for low resolution settings.
- VIDEO_PROFILE_H264_MAIN: provides standard image quality for typical high-definition devices. It is recommended for most resolution settings.
- VIDEO_PROFILE_H264_HIGH: provides superior image quality for high-resolution and large-screen devices. It is recommended for high resolution settings.
For H.264, the default value is VIDEO_PROFILE_H264_HIGH. For H.265, the default value is VIDEO_PROFILE_H265_MAIN.
FPS (Optional)
Frame rate of an output video file.
The value can be 0 or an integer from 5 to 60. 0 indicates that the input frame rate is maintained.
Maximum Reference Frames
Number of past and future frames affected during decoding.
Its value is:- An integer ranging from 1 to 8 for H.264
- Permanently 4 for H.265
Quality
Video encoding quality level.
Two quality levels are available.- VIDEO_PRESET_HSPEED: Ideal for efficiency-driven scenarios like short videos, though output visual quality is slightly lower.
- VIDEO_PRESET_HIGHQUALITY: Ideal for quality-driven scenarios like long videos, though transcoding efficiency is slightly lower.
Default value: VIDEO_PRESET_HIGHQUALITY
Black Bar Removal
Whether to automatically detect and crop black bars.
This option is disabled by default.
- If both the width and height of the transcoded video are set to 0, the transcoded video is output based on the source video resolution.
- If only one side (width or height) of the transcoded video is set to 0, the value of the other side is used to perform proportional scaling based on the source video resolution and output the transcoded video.
Table 3 Recommended resolutions and bitrates Video Quality
Recommended Resolution
Recommended Bitrate for H.265 (kbit/s)
Recommended Bitrate for H.264 (kbit/s)
4K
3840 x 2160
5600
8000
2K
2560 x 1440
4900
7000
UHD
1920 x 1080
2100
3000
HD
1280 x 720
700
1000
SD
854 x 480
500
600
LD
480 x 270
200
300
If the bitrate is set to 0 and the configured resolution is not one of the recommended resolutions in the preceding table, use the recommended bitrate for the recommended resolution which is close to the configured resolution.
For example, if the bitrate is set to 0 and the resolution is set to 900 x 500, the output bitrate is the recommended bitrate for the resolution 854 x 480, that is, 500 for H.265 and 600 for H.264.
- Configure audio parameters by referring to Figure 3 and Table 4.
If Video only is selected, the output file does not contain any audio information. This option applies to the scenario where video is extracted from a media file.
Table 4 Audio parameters Parameter
Description
Audio Codec
Audio codec. The options are AAC (default) and HEAAC1.
For HLS video playback on the web, AAC is recommended, as other audio formats may cause muted playback.
Audio Channel
Possible values include Stereo, Mono, and 5.1 Channel. The default is Stereo.
Sampling Rate
Sampling frequency of the recording device on analog signals within a specified time range
The value can be AUTO, 22050, 32000, 44100, 48000, or 96000. The unit is Hz.
The default value Auto indicates adaptive sampling.
Bitrate (Optional)
Bitrate of an output audio.
The value is 0 or an integer ranging from 8 to 1,000.
Unit: kbit/s
- Click OK.
Modifying a Transcoding Template
You can modify a custom template, including the video parameters, audio parameters, and template name, to meet your service requirements.
- Log in to the MPC console.
- In the navigation pane, choose Global Settings > Custom Templates.
- Locate the target template and click Modify in the Operation column.
- Reconfigure the parameters that you want to modify. For details about the parameters, see Creating a Transcoding Template.
- Click OK.
Deleting a Transcoding Template
You can delete a template that is no longer used.
- Log in to the MPC console.
- In the navigation pane, choose Global Settings > Custom Templates.
- Locate the target template and click Delete in the Operation column.
- Click Yes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot


