All Products
Search
Document Center

Intelligent Media Services:SubmitMediaConvertJob

Last Updated:Jul 30, 2026

Submits a media processing task.

Operation description

This is an asynchronous operation. After you submit a task, a task ID is returned. The task is not yet complete at this point and enters a queue for asynchronous execution in the background. The final result is delivered through a callback notification. You can also proactively query the task status by calling Query media transcoding task.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ice:SubmitMediaConvertJob

none

*All Resource

*

None None

Request syntax

POST  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

ClientToken

string

No

The idempotency key. Ensures request idempotency.

86f8e525-9d73-4dac-88aa-7aa4e950c00a

Config

string

Yes

The transcoding task configuration. For more information, see MediaConvertJobConfig.

{ "Inputs": [ { "InputFile": { "Type": "OSS", "Media": "http://**.oss-cn-shanghai.aliyuncs.com/input/**/60min.mp4" } } ], "OutputGroups": [ { "GroupConfig": { "Type": "File", "OutputFileBase": { "Type": "OSS", "Media": "http://**.oss-cn-shanghai.aliyuncs.com/output/**/" } }, "Outputs": [ { "OutputFile": "hd.mp4", "TemplateId": "S00000001-200030" }, { "OutputFile": "sd.mp4", "TemplateId": "S00000001-200020" } ] } ] }

UserData

string

No

The user data.

{"videoId":"abcd"}

PipelineId

string

No

The pipeline ID.

e197ecfb103e4849922b054d3032f954

Response elements

Element

Type

Description

Example

object

The task result of committing a media transcoding node.

RequestId

string

The request ID.

******11-DB8D-4A9A-875B-275798******

Job

object

The media transcoding task.

RequestId

string

The request ID.

A2129C9F-CE95-58B5-B8C1-07758FF6C86F

ClientToken

string

The idempotency parameter for the media transcoding task creation request.

FB7F25E9-AD9B-1603-8AF6-F1E42DF2E706

JobId

string

The media transcoding task ID.

****20b48fb04483915d4f2cd8ac****

Config

object

The media transcoding task configuration.

Inputs

array

The job inputs.

MediaConvertInput

A job input.

[{\"Src\":{\"Type\":\"MAP_SERVICE\",\"DataId\":\"479f6c63f66dcc1a9a09420fee32cbdf\",\"ZoomLevel\":18},\"Idx\":1}]

Outputs

array

The output configurations.

MediaConvertOutput

An output configuration.

[]

OutputGroups

array

The output group configurations.

MediaConvertOutputGroup

An output group configuration.

JobName

string

The job name.

Name

PipelineId

string

The pipeline ID.

***48a4edf410b908aecd91fc3b***

UserData

string

The user data.

{"videoId":"abcd"}

Code

string

The error code returned when the media transcoding task fails.

InvalidParameter.ResourceContentBad

Message

string

The detailed error message returned when the media transcoding task fails.

The resource operated InputFile is bad

State

string

The media transcoding task status. Valid values:

  • Inited: initialized.

  • Running: running.

  • Success: transcoding succeeded.

  • Failed: transcoding failed.

  • Cancelled: canceled.

Success

OutputDetails

array

The media transcoding output result list.

MediaConvertOutputDetail

The media transcoding output result.

OutputGroupDetails

array

The media transcoding output group result list.

MediaConvertOutputGroupDetail

The media transcoding output group result.

Examples

Success response

JSON format

{
  "RequestId": "******11-DB8D-4A9A-875B-275798******",
  "Job": {
    "RequestId": "A2129C9F-CE95-58B5-B8C1-07758FF6C86F",
    "ClientToken": "FB7F25E9-AD9B-1603-8AF6-F1E42DF2E706",
    "JobId": "****20b48fb04483915d4f2cd8ac****",
    "Config": {
      "Inputs": [
        {
          "Name": "InputVideo",
          "InputFile": {
            "Type": "OSS",
            "Media": "http://bucket.loction.aliyuncs.com/path/to/video.mp4"
          }
        }
      ],
      "Outputs": [
        {
          "Name": "output-video",
          "OutputFile": {
            "Type": "OSS",
            "Media": "http://bucket.loction.aliyuncs.com/path/to/video.mp4"
          },
          "TemplateId": "****96e8864746a0b6f3****",
          "Priority": 6,
          "Features": "{}",
          "OverrideParams": "{}"
        }
      ],
      "OutputGroups": [
        {
          "Name": "hls-group",
          "GroupConfig": {
            "ManifestName": "manifest",
            "Type": "Hls",
            "OutputFileBase": {
              "Type": "OSS",
              "Media": "http://bucket.loction.aliyuncs.com/path/to/video.mp4"
            }
          },
          "Outputs": [
            {
              "Name": "group-output",
              "OutputFileName": "720p.mp4",
              "TemplateId": "****96e8864746a0b6f3****\n",
              "Priority": 6,
              "Features": "{}",
              "OverrideParams": "{}"
            }
          ]
        }
      ],
      "JobName": "Name"
    },
    "PipelineId": "***48a4edf410b908aecd91fc3b***",
    "UserData": "{\"videoId\":\"abcd\"}",
    "Code": "InvalidParameter.ResourceContentBad",
    "Message": "The resource operated InputFile is bad",
    "State": "Success",
    "OutputDetails": [
      {
        "Name": "720P-mp4",
        "TaskId": "******4215e042b3966ca5441e******",
        "Status": "Success",
        "Code": "InvalidParameter.ResourceContentBad\n",
        "Message": "The resource operated InputFile is bad\n",
        "Result": {
          "OutputFile": {
            "Type": "OSS",
            "Media": "oss://bucket/path/to/video.mp4\n",
            "Url": "oss://bucket/path/to/video.mp4"
          },
          "OutFileMeta": {
            "FileBasicInfo": {
              "MediaId": "9066406c306771f0bfa35107e0c90102",
              "FileName": "file.m3u8",
              "FileStatus": "Normal",
              "FileType": "source_file",
              "FileSize": "31737",
              "FileUrl": "http://bucket.oss-cn-shanghai.aliyuncs.com/path/to/file.m3u8",
              "Region": "cn-shanghai",
              "FormatName": "hls,applehttp",
              "Duration": "403.039999",
              "Bitrate": "888.563",
              "Width": "848",
              "Height": "478"
            },
            "AudioStreamInfoList": [
              {
                "Index": "1",
                "CodecName": "aac",
                "CodecLongName": "AAC (Advanced Audio Coding)",
                "CodecTimeBase": "1/44100",
                "CodecTagString": "[15][0][0][0]",
                "CodecTag": "0x000f",
                "SampleFmt": "fltp",
                "SampleRate": "44100",
                "Channels": "2",
                "ChannelLayout": "stereo",
                "Timebase": "1/90000",
                "StartTime": "1.473556",
                "Duration": "403.039989",
                "Bitrate": "0.f",
                "Lang": "cn"
              }
            ],
            "VideoStreamInfoList": [
              {
                "Index": "0",
                "Codec_name": "h264",
                "Codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
                "Profile": "High",
                "Codec_time_base": "1/50",
                "Codec_tag_string": "[27][0][0][0]",
                "Codec_tag": "0x001b",
                "Width": "848",
                "Height": "478",
                "Has_b_frames": "2",
                "Sar": "478:477",
                "Dar": "16:9",
                "PixFmt": "yuv420p",
                "Level": "31",
                "Fps": "25.0",
                "Avg_fps": "25.0",
                "Time_base": "1/90000",
                "Start_time": "1.473556",
                "Duration": "403.039989",
                "Bit_rate": "888.563",
                "NumFrames": "10040",
                "Lang": "cn",
                "Rotate": "0"
              }
            ]
          }
        },
        "CreateTime": "2024-12-07T06:06:58Z",
        "FinishTime": "2024-12-07T13:01:07Z"
      }
    ],
    "OutputGroupDetails": [
      {
        "Name": "hls-group",
        "TaskId": "******22dad741d086a50325f9******",
        "Code": "InvalidParameter.ResourceContentBad",
        "Message": "The resource operated \"InputFile\" is bad",
        "Status": "Success",
        "Outputs": [
          {
            "Name": "720P-mp4",
            "TaskId": "******4215e042b3966ca5441e******",
            "Status": "Success",
            "Code": "InvalidParameter.ResourceContentBad\n",
            "Message": "The resource operated InputFile is bad\n",
            "Result": {
              "OutputFile": {
                "Type": "OSS",
                "Media": "oss://bucket/path/to/video.mp4\n",
                "Url": "oss://bucket/path/to/video.mp4"
              },
              "OutFileMeta": {
                "FileBasicInfo": {
                  "MediaId": "9066406c306771f0bfa35107e0c90102",
                  "FileName": "file.m3u8",
                  "FileStatus": "Normal",
                  "FileType": "source_file",
                  "FileSize": "31737",
                  "FileUrl": "http://bucket.oss-cn-shanghai.aliyuncs.com/path/to/file.m3u8",
                  "Region": "cn-shanghai",
                  "FormatName": "hls,applehttp",
                  "Duration": "403.039999",
                  "Bitrate": "888.563",
                  "Width": "848",
                  "Height": "478"
                },
                "AudioStreamInfoList": [
                  {
                    "Index": "1",
                    "CodecName": "aac",
                    "CodecLongName": "AAC (Advanced Audio Coding)",
                    "CodecTimeBase": "1/44100",
                    "CodecTagString": "[15][0][0][0]",
                    "CodecTag": "0x000f",
                    "SampleFmt": "fltp",
                    "SampleRate": "44100",
                    "Channels": "2",
                    "ChannelLayout": "stereo",
                    "Timebase": "1/90000",
                    "StartTime": "1.473556",
                    "Duration": "403.039989",
                    "Bitrate": "0.f",
                    "Lang": "cn"
                  }
                ],
                "VideoStreamInfoList": [
                  {
                    "Index": "0",
                    "Codec_name": "h264",
                    "Codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
                    "Profile": "High",
                    "Codec_time_base": "1/50",
                    "Codec_tag_string": "[27][0][0][0]",
                    "Codec_tag": "0x001b",
                    "Width": "848",
                    "Height": "478",
                    "Has_b_frames": "2",
                    "Sar": "478:477",
                    "Dar": "16:9",
                    "PixFmt": "yuv420p",
                    "Level": "31",
                    "Fps": "25.0",
                    "Avg_fps": "25.0",
                    "Time_base": "1/90000",
                    "Start_time": "1.473556",
                    "Duration": "403.039989",
                    "Bit_rate": "888.563",
                    "NumFrames": "10040",
                    "Lang": "cn",
                    "Rotate": "0"
                  }
                ]
              }
            },
            "CreateTime": "2024-12-07T06:06:58Z",
            "FinishTime": "2024-12-07T13:01:07Z"
          }
        ],
        "CreateTime": "2025-03-21T01:48:41Z",
        "FinishTime": "2025-03-21T01:48:41Z\n"
      }
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.