This topic describes how to create a custom transcoding template and set relevant parameters.

Background information

ApsaraVideo Media Processing (MPS) allows you to create custom transcoding templates and configure template parameters and settings as needed. You can use a custom transcoding template when you create a transcoding job or create a workflow.

Procedure

  1. Log on to the MPS console.
  2. In the top navigation bar, select a region from the drop-down list.
  3. In the left-side navigation pane, choose Global Settings > Encoding Templates. The Encoding Template page appears.
  4. Click Create Encoding Template.
  5. Set the parameters in the Basic Parameters section.
    Parameter Description
    Encoding Template Name Enter the name of the transcoding template.
    Encapsulation Format Select a container format from the drop-down list. Default value: mp4.
  6. Set the parameters in the Video Parameters section. If you select Disable Video, you do not need to set other parameters in this section.
    Note If you select Disable Video, the output file does not include video information. This option is applicable if you want to extract audio information from a video file. For more information about parameters involved in video transcoding, see Parameter details. For more information about output formats supported for transcoding jobs, see Supported formats.
    Parameter Description
    Encoding Format Select an encoding format from the drop-down list. Default value: H.264.
    Encoding Level Select an encoding profile from the drop-down list. Default value: For High-Resolution Devices.
    Bitrate, Constant Rate Factor (CRF), Video Width (px), Video Height (px), Auto-Rotate Screen, Frame Rate (fps), Maximum Frames between Keyframes, Scan Mode, Buffer Size, and Peak Bitrate. Optional. If you need to set one of these parameters, follow the on-screen instructions that appear when you move the pointer over the text box next to the parameter.
  7. Click Next to set the audio parameters.
  8. Set the parameters in the Audio Parameters step. If you select Disable Audio, you do not need to set other parameters in this section.
    Note If you select Disable Audio, the output file does not include audio information. This option is applicable if you want to extract video information from a video file. For more information about the parameters involved in audio transcoding, see Parameter details.
    Parameter Description
    Encoding Format Select an encoding format from the drop-down list. Default value: AAC.
    Note If you set the Encoding Format parameter to MP3, the Sampling Rate parameter cannot be set to 96000.
    Sampling Rate Select a sampling rate from the drop-down list. Default value: 44100.
    Output Bitrate Enter the audio bitrate of output files. Default value: 128. Valid values: 8 to 1000.
    Audio Channels Select the number of audio channels that the output file has from the drop-down list. Default value: 2.
  9. Click Next to set the advanced parameters.
  10. Set the parameters in the Advanced Parameters step.
    Parameter Description
    Video Resolution Detection Optional. To enable this feature, turn on Video Resolution Detection.

    Set the Original Video Resolution Lower Than Template Setting parameter to Encode with Original Video or Do Not Encode.

    Video Bitrate Detection Optional. To enable this feature, turn on Video Bitrate Detection.

    Set the Original Video Bitrate Lower Than Template Setting parameter to Encode with Original Video or Do Not Encode.

    Audio Bitrate Detection Optional. To enable this feature, turn on Audio Bitrate Detection.

    Set the Original Audio Bitrate Lower Than Template Setting parameter to Encode with Original Video or Do Not Encode.

  11. Click Submit. You can view the created template on the Encoding Template page. If you need to modify or delete the template, click Edit or Delete in the Actions column.

Related API operations

AddTemplate