Media transcoding

Updated at:

Intelligent Media Management (IMM) provides a media processing feature for format conversion, container format conversion, resolution adjustment, frame rate adjustment, video snapshots, sprite extraction, and watermarking of audio and video files. This topic describes the supported features in detail.

Feature overview

The media processing feature of Intelligent Media Management (IMM) provides a one-stop solution for processing media files. This feature lets you perform various operations, such as format conversion, container format conversion, resolution adjustment, and frame rate adjustment, to adapt video and audio files for various playback devices and requirements.

image

Prerequisites

  • An AccessKey pair is created and obtained. For more information, see Create an AccessKey pair.

  • OSS is activated, a bucket is created, and objects are uploaded to the bucket. For more information, see Upload objects.

  • IMM is activated. For more information, see Activate IMM.

  • A project is created in the IMM console. For more information about how to create a project by using the IMM console, see Create a project.

    Note
    • You can also call the CreateProject operation to create a project. For more information, see CreateProject.

    • You can call the ListProjects operation to query existing projects in a specific region. For more information, see ListProjects.

Notes

  • If you encounter any problems, you can join the DingTalk group to communicate with Intelligent Media Management engineers in real time. For the DingTalk group number, see Contact us.

  • You are charged for using media transcoding API operations. For more information, see Billing overview.

Supported audio and video formats

Category

Format

Audio

Mainstream audio formats, such as AAC, MP3, WAV, FLAC, WMA, AC3, and OPUS.

Video

Mainstream video formats, such as MP4, MPEG-TS, MKV, MOV, AVI, FLV, M3U8, WebM, WMV, RM, and VOB.

Benefits

Comparison item

Alibaba Cloud transcoding

Self-managed transcoding

Transcoding capability

A high-speed and stable parallel transcoding system that dynamically adjusts transcoding resources on demand. It automatically scales resources in or out and seamlessly expands cluster resources to handle high-concurrency transcoding requirements.

Difficult to support large-scale, high-concurrency transcoding tasks.

Transcoding algorithm

Powerful computing resources and advanced video processing algorithms.

Relies on open source transcoding services.

Features

Video transcoding, container format conversion, conversion to HLS, video-to-animated-image conversion, video merging, video snapshots, video sprite generation, audio transcoding, audio extraction, and caption extraction.

You must integrate open source transcoding services and build a transcoding service from the underlying layer.

Features

The following table describes the features supported by IMM media transcoding.

Feature

Description

Video transcoding

Converts video encoding formats, converts container formats, and adjusts resolution, frame rate, and bitrate.

Video snapshot

Extracts specific frames from a video and saves them as static images to capture specific moments.

Audio transcoding

Converts audio formats and adjusts the bitrate, number of sound channels, and sample rate.

Video sprite generation

Combines multiple video frames into a single image file arranged in a grid to generate a sprite.

Video-to-animated-image conversion

Converts video files to animated image formats, such as GIF or WebP.

Video caption extraction

Extracts caption information from video files.

Video merging

Merges multiple video clips into a complete video and converts it to the required format.

Audio merging

Merges multiple audio clips into a continuous audio file.

FAQ

  • What do I do if a video transcoding request fails?

    • Set the TargetAudio.Codec parameter to a value other than copy and retry the request. For more information, see TargetAudio.

  • Why does the file size increase after video transcoding?

    • The file size may increase after transcoding because audio and video transcoding uses lossy compression. A higher bitrate can result in a larger file size without improving the quality beyond that of the source file. A higher bitrate means that less quality is lost during compression.

    • To control the output file size, you can set the BitrateOption, Bitrate, or CRF parameter in TargetVideo to control the bitrate of the video stream. You can also set the BitrateOption, Bitrate, or Quality parameter in TargetAudio to control the bitrate of the audio stream.

  • Can I cancel a video transcoding task?

    • No, you cannot.

  • The orientation of my video is incorrect after transcoding. How do I adjust it?

    • In the TargetVideo parameter settings, set the Codec parameter to a value other than copy and set the AdaptiveResolutionDirection parameter to true. This enables automatic rotation.

  • My video is stretched after transcoding. How do I prevent this?

    • In the TargetVideo parameter settings, set the Codec parameter to a value other than copy and set the AdaptiveResolutionDirection parameter to true. This enables automatic rotation. Then, set the ScaleType parameter to fit to scale the video proportionally and prevent black bars.

  • How do I perform fixed-bitrate transcoding? Setting only the bitrate parameter does not work.

    • In the TargetVideo parameter, the bitrate parameter supports variable bitrate (VBR) but not constant bitrate (CBR). VBR and CBR differ in their instantaneous bitrate. If you require a cap on the bitrate, you can set the maxbitrate parameter.

  • How do I get the duration of a successfully transcoded video?

    • You can retrieve the duration of a successfully transcoded video by calling the DetectMediaMeta API operation. You can also use the video/info parameter of x-oss-process. For more information, see Video information extraction.

  • Does the CreateMediaConvertTask API operation of IMM support RocketMQ 5.0?

    • This is not supported. Only RocketMQ 4.0 is supported.