Overview
Menu

Template Parameter Description

Last updated: 2020-02-24 15:08:38Download PDF

When creating a parameter template, you need to set the parameters, including bitrate, video width and height, remuxing format, and codec. This document describe the key parameters for each template and their value ranges.

Audio/Video Transcoding Template

Category Parameter Description
Muxing
Container format The following video and audio container formats are supported:
  • Video: MP4, TS, HLS, and FLV
  • Audio: MP3, M4A, FLAC, and OGG
  • Video stream deletion If this parameter is enabled, the output video after transcoding will contain only the audio stream with the video stream discarded
    Audio stream deletion If this parameter is enabled, the output video after transcoding will contain only the video stream with the audio stream discarded
    Video encoding Codec H.264 and H.265 are supported
    Bitrate Supported bitrate range: 10–35 Mbps
    Frame rate Supported frame rate range: 1–60 fps; common values: 24, 25, and 30 fps
    Resolution
  • Supported width range: 128–4,096 px
  • Supported height range: 128–4,096 px
  • GOP length Supported GOP length range: 1–10s
    Profile
  • When the video codec is H.264, the `Baseline`, `Main`, and `High` profiles are supported
  • When the video codec is H.265, only the `Main` profile is supported
  • Color space YUV420P is supported
    Audio encoding parameters Codec MP3, AAC, AC3, and FLAC are supported
    Sample rate The following audio sample rates are supported:
  • 34,000 Hz
  • 44,100 Hz
  • 48,000 Hz
  • Bitrate Supported bitrate range: 26–256 Kbps, including the following values:
  • 48 Kbps
  • 64 Kbps
  • 128 Kbps
  • Channel
  • Mono
  • Dual
  • Stereo
  • Watermark Template

    ParameterDescription
    TypeImage and text watermarks are supported:
  • Image watermark: Static or animated images are supported
  • Text watermark: Texts in various languages are supported
  • PositionRelative position of a watermark in the video
    Image DimensionSize of an image watermark in the video
    Image ContentBinary content of an image watermark
    Font SizeFont size of a text watermark
    Font TypeFont of a text watermark, e.g., Times New Roman
    Font ColorColor of a text watermark, e.g., 0xRRGGBB
    Font AlphaTransparency of text watermark. Value range: 0–100%

    Screenshot Template

    Time point screenshot template

    A time point screenshot template is used to take a screenshot at a specified time point or to generate a thumbnail cover.

    ParameterDescription
    FormatOutput format of a screenshot file. Currently, only JPG is supported
    WidthScreenshot width. Value range: 128–4,096 px
    HeightScreenshot height. Value range: 128–4,096 px
    Fill TypeFilling refers to the way of processing a screenshot when its aspect ratio is different from that of the source video. Generally, the following filling types are supported:
  • Stretch: The screenshot is stretched to match the aspect ratio of the source video, which may distort the image.
  • Fill in black: This option retains the aspect ratio of the source video for the screenshot and the unmatched area is filled in black.
  • Fill in white: This option retains the aspect ratio of the source video for the screenshot and the unmatched area is filled in white.
  • Gaussian blur: This option retains the aspect ratio of the source video for the screenshot and Gaussian blur is applied to the unmatched area.
  • Sampled screenshot template

    A sampled screenshot template is used to take sampled screenshots.

    ParameterDescription
    FormatOutput format of a screenshot file. Currently, only JPG is supported
    WidthScreenshot width. Value range: 128–4,096 px
    HeightScreenshot height. Value range: 128–4,096 px
    Sample TypeThe following two types are supported:
  • Sample by percent: If this is selected and Interval is set to 5% for example, 20 screenshots will be generated
  • Sample by time: If this is selected and Interval is set to 10s for example, the number of generated screenshots will depend on the video length
  • IntervalSampling interval.
  • If the sampling type is by percent, this parameter will be a percent value
  • If the sampling type is by time, this parameter will be in seconds
  • Fill TypeFilling refers to the way of processing a screenshot when its aspect ratio is different from that of the source video. Generally, the following filling types are supported:
  • Stretch: The screenshot is stretched to match the aspect ratio of the source video, which may distort the image.
  • Fill in black: This option retains the aspect ratio of the source video for the screenshot and the unmatched area is filled in black.
  • Fill in white: This option retains the aspect ratio of the source video for the screenshot and the unmatched area is filled in white.
  • Gaussian blur: This option retains the aspect ratio of the source video for the screenshot and Gaussian blur is applied to the unmatched area.
  • Image sprite screenshot template

    An image sprite screenshot template is used to take screenshots and combine them to generate an image sprite.

    ParameterDescription
    FormatOutput format of an image sprite file. Currently, only JPG is supported
    WidthSub-image width
    HeightSub-image height
    RowsNumber sub-image rows in an image sprite
    ColumnsNumber sub-image columns in an image sprite
    Sample TypeSub-image sampling method. Currently, only sampling by time is supported
    IntervalTime interval for capturing sub-images
    • The value of Width * Columns should be between 128 and 4,096 px (i.e., the range of the image sprite width).
    • The value of Height * Rows should be between 128 and 4,096 px (i.e., the range of the image sprite height).

    Animated Image Generating Template

    The target specification of an animated image is subject to parameters such as animated image format, width, height, and frame rate.

    ParameterDescription
    FormatOutput format of an animated image file. Currently, only GIF and WEBP are supported
    WidthAnimated image width. Value range: 128–4,096 px
    HeightAnimated image height. Value range: 128–4,096 px
    FPSSupported frame rate range: 1–60 fps