Learn about recommended template configurations for transcoding, snapshots, and watermarks in media processing.
Transcoding templates
Video parameters
-
Disable Video
If you select this check box, the transcoded stream does not contain video information. This is useful for extracting audio in scenarios such as radio broadcast.
-
Bitrate and Resolution
-
Bitrate refers to the amount of data a video file uses per unit of time. It is the most important factor for image quality control in video encoding. Bitrate is measured in bits per second (bit/s), commonly expressed in Kbit/s or Mbit/s.
For videos at the same resolution, a higher bitrate means a lower compression ratio and better video quality. With a higher sampling rate per unit of time, the data stream is more accurate, so the processed video closely matches the original file in quality and definition. However, the playback device must have sufficient decoding capability.
-
Resolution refers to the level of detail in a video, expressed as the number of pixels in each direction. For example, 1,280 × 720 means a width of 1,280 pixels and a height of 720 pixels.
Resolution determines how realistic and clear a video appears. Higher resolution means more pixels and sharper images. Resolution is also a key factor that determines the required bitrate, as different resolutions require different bitrates.
-
In general, higher resolutions require higher bitrates. Each resolution has a recommended bitrate range. A bitrate below this range results in poor video quality, while a bitrate above this range wastes network bandwidth and storage space with limited improvement to image quality.
-
The following table lists the recommended bitrate and resolution for each definition.
Definition
Recommended bitrate
Recommended resolution
Resolution range
Low Definition
400
640×360
128×128~640×360
Standard Definition
900
720×540
640×360~720×540
High Definition
1500
1280×720
720×540~1280×720
Ultra High Definition
3000
1920×1080
1280×720~1920×1080
2K
3500
2560×1440
1920×1080~2560×1440
4K
6000
2560×1440
2560×1440~3840×2160
Note-
Width and height are optional. If only the width is specified, the height is automatically calculated based on the aspect ratio of the video mezzanine file. If neither is specified, the dimensions of the video mezzanine file are used.
-
The unit of the bitrate is Kbit/s.
-
The unit of the resolution (width × height) is pixel.
-
-
-
Frame Rate
Frame rate measures the number of frames displayed per second in a video. The unit is frames per second (FPS) or Hz.
A higher frame rate produces smoother, more lifelike video. In most cases, 25 to 30 fps is sufficient, while 60 fps delivers an immersive playback experience. Beyond 75 fps, the improvement is less noticeable. Setting a frame rate higher than your monitor's refresh rate wastes graphics processing power without visible benefit. Higher frame rates at the same resolution also require greater graphics card capability.
n ApsaraVideo VOD, the recommended frame rate is 25 fps.
-
Maximum Keyframe Interval (the number of frames in a GOP)
A Group of Pictures (GOP) is a sequence of consecutive frames in an MPEG-encoded video or video stream. A GOP starts with an I-frame and ends before the next I-frame. A GOP contains the following frame types:
-
Intra coded picture (I-frame): the keyframe. An I-frame contains all information required to produce the picture for that frame. It is independently decoded and can be regarded as a static image. The first frame in a video sequence is always an I-frame, and each GOP starts with an I-frame.
-
P-frame (predictive coded picture): A P-frame is encoded with reference to the preceding I-frame or P-frame and contains motion-compensated difference information. During decoding, the difference is superimposed on the previously cached image to produce the final image. P-frames use fewer data bits than I-frames but are more sensitive to transmission errors due to their dependencies on preceding frames.
-
Bidirectionally predictive coded picture (B-frame): A B-frame contains motion-compensated difference information relative to both the previous and subsequent frames. During decoding, the B-frame data is combined with the cached previous image and the decoded subsequent image to produce the final image. B-frames achieve a high compression ratio but require greater decoding performance.
The GOP value specifies the keyframe interval, which is the distance between two Instantaneous Decoding Refresh (IDR) frames, or the maximum number of frames in a frame group. At least one keyframe is required per second of video. More keyframes improve video quality but increase bandwidth consumption and network load. The keyframe interval in seconds equals the GOP value divided by the frame rate.
In ApsaraVideo VOD, the recommended GOP value is 250 frames and the recommended frame rate is 25 fps. Therefore, the recommended interval is 10 seconds.
-
Audio parameters:
-
Disable Audio
If you select this check box, the transcoded stream does not contain audio information. Select this option to remove audio from the video mezzanine file.
-
Sample Rate
The sample rate, or sampling frequency, defines how many samples are extracted from a continuous-time signal per second to form a discrete-time signal. Unit: Hz. A higher sample rate produces more realistic and natural sound when converting analog signals to digital.
In ApsaraVideo VOD, the recommended sample rate is 44,100 Hz.
-
Bitrate
Sound quality
Recommended bitrate
Standard sound quality
128
High sound quality
320
NoteThe unit of the bitrate is Kbit/s. The audio bitrate can range from 8 to 1,000 Kbits/s.
-
Audio Channels
In ApsaraVideo VOD, the recommended number of audio channels is 2.
Snapshot template configuration
-
Normal snapshots
Configure normal snapshot parameters based on your business requirements. For more information, see Parameters for normal snapshots (SnapshotConfig). To keep the snapshot dimensions the same as the video mezzanine file, do not set the Width and Height parameters.
-
Sprite snapshots
Configure sprite snapshot parameters based on your business requirements. For more information, see Parameters for sprite snapshots (SpriteSnapshotConfig). Unless you have specific requirements, set KeepCellPic to delete to remove the original small image files used to generate the sprite snapshots.
Watermark configuration
-
Image watermark
To ensure consistent display quality across different video resolutions, set the Width, Height, Dx, and Dy parameters based on image proportions. For more information, see Parameters for image watermarks.
-
Text watermark
For more information, see Parameters for text watermarks. Unless you have specific requirements, keep all parameters except Content at their default values.