All Products
Search
Document Center

Intelligent Media Services:ListTranscodeJobs

Last Updated:Dec 16, 2024

Queries a list of transcoding jobs.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ice:ListTranscodeJobs
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
StartOfCreateTimestringNo

The beginning of the time range during which the jobs to be queried were created. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

2022-07-01T00:00:00Z
EndOfCreateTimestringNo

The end of the time range during which the jobs to be queried were created. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

2022-07-15T00:00:00Z
ParentJobIdstringNo

The job ID.

7b38a5d86f1e47838927b6e7ccb1****
StatusstringNo

The state of the job.

  • Init: The job is submitted.
  • Success: The job is successful.
  • Fail: The job failed.
Success
OrderBystringNo

The order that you use to sort the query results. Valid values:

  • CreateTimeDesc: sorts the query results by creation time in descending order.
  • CreateTimeAsc: sorts the query results by creation time in ascending order.
CreateTimeDesc
PageSizeintegerNo

The number of entries per page. Valid values: 0 to 100. Default value: 20.

10
NextPageTokenstringNo

The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request.

ab4802364a2e49208c99efab82dfa8e8

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

31E30781-9495-5E2D-A84D-759B0A01E262
Jobsarray<object>

The list of jobs.

Jobobject

The information about the job.

CreateTimestring

The time when the job was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2022-01-12T08:49:41Z
Namestring

The job name.

transcode-job
RequestIdstring

The ID of the request that submitted the job.

31E30781-9495-5E2D-A84D-759B0A01E262
ParentJobIdstring

The main job ID.

8b2198504dd340b7b3c9842a74fc9baa
JobCountinteger

The number of subjobs.

1
Statusstring

The state of the job.

  • Success: At least one of the subjobs is successful.
  • Fail: All subjobs failed.
Success
TriggerSourcestring

The source of the job. Valid values:

  • API
  • WorkFlow
  • Console
API
Percentinteger

The completion percentage of the job.

0
SubmitTimestring

The time when the job was submitted. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2022-01-12T08:49:41Z
FinishTimestring

The time when the job was complete. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2022-01-12T08:49:41Z
InputGrouparray<object>

The input group of the job. An input of a single file indicates a transcoding job. An input of multiple files indicates an audio and video stream merge job.

InputGroupobject

The input of the job.

Typestring

The type of the media object. Valid values:

  • OSS: an Object Storage Service (OSS) object.
  • Media: a media asset.
OSS
Mediastring

The media object.

  • If Type is set to OSS, the URL of an OSS object is returned. Both the OSS and HTTP protocols are supported.
  • If Type is set to Media, the ID of a media asset is returned.
oss://bucket/path/to/video.mp4
InputUrlstring

The URL of the media asset. This parameter is specified only when the media asset is transcoded.

oss://bucket/path/to/video.mp4
OutputGrouparray<object>

The output group of the job.

OutputGroupobject

The output of the job.

Outputobject

The output file configuration.

Typestring

The type of the media object. Valid values:

  • OSS: an OSS object.
  • Media: a media asset.
OSS
Mediastring

The media object. If Type is set to OSS, the URL of an OSS object is returned. Both the OSS and HTTP protocols are supported. If Type is set to Media, the ID of a media asset is returned.

oss://bucket/path/to/video.mp4
OutputUrlstring

The URL of the transcoded output stream. This parameter is required only when the output is a media asset.

oss://bucket/path/to/{MediaId}/{JobId}.mp4
ProcessConfigobject

The job processing configuration.

Transcodeobject

The transcoding configuration.

TemplateIdstring

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410
OverwriteParamsobject

The parameters that are used to overwrite the corresponding parameters of the template.

Videoobject

The video settings.

Codecstring

The encoding format.

H.264
Profilestring

The encoding profile. Valid values: baseline, main, and high.

  • baseline: applicable to mobile devices.
  • main: applicable to standard-definition devices.
  • high: applicable to high-definition devices.

Default value: high.

Main
Bitratestring

The average bitrate of the video.

  • Valid values: [10,50000].
  • Unit: Kbit/s.
3000
Crfstring

The constant rate factor.

  • Valid values: [0,51].
  • Default value: 23 if the encoding format is H.264, or 26 if the encoding format is H.265.

If this parameter is set, the value of Bitrate becomes invalid.

23
Widthstring

The width of the output video.

  • Valid values: [128,4096].
  • Unit: pixels.
  • Default value: the width of the input video.
1920
Heightstring

The height of the output video.

  • Valid values: [128,4096].
  • Unit: pixels.
  • Default value: the height of the input video.
1080
Fpsstring

The frame rate.

  • Valid values: (0,60].
  • The value is 60 if the frame rate of the input video exceeds 60.
  • Default value: the frame rate of the input video.
25
Gopstring

The maximum number of frames between two keyframes.

  • Valid values: [1,1080000].
  • Default value: 250.
250
Presetstring

The preset video algorithm. This parameter takes effect only if the encoding format is H.264. Valid values: veryfast, fast, medium, slow, and slower. Default value: medium.

medium
ScanModestring

The scan mode. Valid values: interlaced and progressive.

progressive
PixFmtstring

The pixel format of the video. Valid values: standard pixel formats such as yuv420p and yuvj420p.

yuv420p
Removestring

Indicates whether the video was removed.

false
Cropstring

The method of video cropping. Valid values:

  • border: automatically detects and removes black bars.
  • A value in the width:height:left:top format: crops the videos based on the custom settings. Example: 1280:800:0:140.
1280:800:0:140
Padstring

The black bars added to the video.

  • Format: width:height:left:top.
  • Example: 1280:800:0:140.
1280:800:0:140
LongShortModestring

Indicates whether the auto-rotate screen feature is enabled.

false
Bufsizestring

The buffer size.

  • Valid values: [1000,128000].
  • Default value: 6000.
  • Unit: KB.
6000
Maxratestring

The maximum bitrate of the output video. Valid values: [10,50000]. Unit: Kbit/s.

9000
AbrMaxstring

The maximum adaptive bitrate (ABR). This parameter takes effect only for Narrowband HD 1.0. Valid values: [10,50000]. Unit: Kbit/s.

6000
Audioobject

The audio settings.

Codecstring

The audio codec. Valid values: AAC, MP3, VORBIS, and FLAC. Default value: AAC.

AAC
Profilestring

The audio codec profile. If the Codec parameter is set to AAC, the valid values are aac_low, aac_he, aac_he_v2, aac_ld, and aac_eld.

aac_low
Sampleratestring

The sampling rate.

  • Default value: 44100.
  • Valid values: 22050, 32000, 44100, 48000, and 96000.
  • Unit: Hz.
44100
Bitratestring

The audio bitrate of the output file.

  • Valid values: [8,1000].
  • Unit: Kbit/s.
  • Default value: 128.
128
Channelsstring

The number of sound channels. Default value: 2.

2
Removestring

Indicates whether the audio stream is deleted.

false
Volumeobject

The volume configurations.

Methodstring

The volume adjustment method. Valid values:

auto
IntegratedLoudnessTargetstring

The output volume.

-6
TruePeakstring

The peak volume.

-1
LoudnessRangeTargetstring

The volume range.

8
Containerobject

The encapsulation format settings.

Formatstring

The container format.

mp4
MuxConfigobject

The encapsulation settings.

Segmentobject

The segment settings.

Durationstring

The segment length.

10
ForceSegTimestring

The forced segmentation point in time.

2,3
ImageWatermarksarray<object>

The watermark configuration for an image.

ImageWatermarkobject

The watermark configuration for an image.

TemplateIdstring

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410
OverwriteParamsobject

The parameters that are used to overwrite the corresponding parameters of the template.

Widthstring

The width of the output video.

32
Heightstring

The height of the output video.

32
Dxstring

The position of the watermark on the x-axis.

10
Dystring

The position of the watermark on the y-axis.

10
ReferPosstring

The reference position of the watermark. Valid values: TopLeft, TopRight, BottomLeft, and BottomRight. Default value: TopLeft.

TopLeft
Timelineobject

The timeline settings.

Startstring

The beginning of the time range for which data was queried.

00:00:05
Durationstring

The duration of the stream. Valid values: the number of seconds or "ToEND".

ToEND
Fileobject

The watermark image file.

Typestring

The type of the media object. Valid values:

  • OSS: an OSS object.
  • Media: a media asset.
OSS
Mediastring

The media object. If Type is set to OSS, the URL of an OSS object is returned. Both the OSS and HTTP protocols are supported. If Type is set to Media, the ID of a media asset is returned.

oss://bucket/path/to/video.mp4
TextWatermarksarray<object>

The configurations of the text watermarks.

TextWatermarkobject

The configurations of the text watermark.

TemplateIdstring

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410
OverwriteParamsobject

The parameters that are used to overwrite the corresponding parameters of the template.

Contentstring

The watermark text. Base64 encoding is not required. The string must be encoded in UTF-8.

FontNamestring

The font of the text.

SimSun
FontColorstring

The color of the text.

#006400
FontAlphastring

The transparency of the watermark.

1.0
Topstring

The distance of the watermark from the top edge.

10
Leftstring

The distance of the watermark from the left edge.

10
FontSizeinteger

The size of the text.

16
BorderWidthinteger

The border width.

0
BorderColorstring

The border color.

#006400
Adaptivestring

Indicates whether the text size was adjusted based on the output video dimensions. true / false, default: false

false
Subtitlesarray<object>

The subtitle configuration.

Subtitleobject

The subtitle configuration.

TemplateIdstring

The template ID.

9547c6ad97cb4f2aaa29683ebd18d410
OverwriteParamsobject

The parameters that are used to overwrite the corresponding parameters of the template.

Formatstring

The format of the subtitle file.

vtt
CharEncstring

The file encoding format.

UTF-8
Fileobject

The subtitle file.

Typestring

The type of the media object. Valid values:

  • OSS: an OSS object.
  • Media: a media asset.
OSS
Mediastring

The media object.

  • If Type is set to OSS, the URL of an OSS object is returned. Both the OSS and HTTP protocols are supported.
  • If Type is set to Media, the ID of a media asset is returned.
oss://bucket/path/to/video.mp4
Encryptionobject

The encryption settings.

EncryptTypestring

The encryption type.

PrivateEncryption
CipherTextstring

The ciphertext of HTTP Live Streaming (HLS) encryption.

MTYi00NDU0LTg5O****
DecryptKeyUristring

The endpoint of the decryption service for HLS encryption.

https://sample.com/path?CipherText=MTYi00NDU0LTg5O****
CombineConfigsarray<object>

The multi-input stream merge configuration.

CombineConfigobject
AudioIndexstring

The audio stream index.

VideoIndexstring

The video stream index.

Startdouble

The start time of the input stream. Default value: 0.

0.0
Durationdouble

The duration of the input stream. The default value is the duration of the video.

20.0
IsInheritTagsboolean

Indicates whether the tags of the input stream are inherited in the output stream. This parameter does not take effect when the input is not a media asset. Default value: false.

UserDatastring

The user data.

user-data
ScheduleConfigobject

The scheduling configuration of the job.

PipelineIdstring

The ID of the MPS queue to which the job was submitted.

e37ebee5d98b4781897f6086e89f9c56
Priorityinteger

The priority of the job. Valid values: 1 to 10. The greater the value, the higher the priority.

5
NextPageTokenstring

The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. The token of the next page is returned after you call this operation for the first time.

019daf5780f74831b0e1a767c9f1c178

Examples

Sample success responses

JSONformat

{
  "RequestId": "31E30781-9495-5E2D-A84D-759B0A01E262",
  "Jobs": [
    {
      "CreateTime": "2022-01-12T08:49:41Z",
      "Name": "transcode-job",
      "RequestId": "31E30781-9495-5E2D-A84D-759B0A01E262",
      "ParentJobId": "8b2198504dd340b7b3c9842a74fc9baa",
      "JobCount": 1,
      "Status": "Success",
      "TriggerSource": "API",
      "Percent": 0,
      "SubmitTime": "2022-01-12T08:49:41Z",
      "FinishTime": "2022-01-12T08:49:41Z",
      "InputGroup": [
        {
          "Type": "OSS",
          "Media": "oss://bucket/path/to/video.mp4",
          "InputUrl": "oss://bucket/path/to/video.mp4"
        }
      ],
      "OutputGroup": [
        {
          "Output": {
            "Type": "OSS",
            "Media": "oss://bucket/path/to/video.mp4",
            "OutputUrl": "oss://bucket/path/to/{MediaId}/{JobId}.mp4"
          },
          "ProcessConfig": {
            "Transcode": {
              "TemplateId": "9547c6ad97cb4f2aaa29683ebd18d410",
              "OverwriteParams": {
                "Video": {
                  "Codec": "H.264",
                  "Profile": "Main",
                  "Bitrate": "3000",
                  "Crf": "23",
                  "Width": "1920",
                  "Height": "1080",
                  "Fps": "25",
                  "Gop": "250",
                  "Preset": "medium",
                  "ScanMode": "progressive",
                  "PixFmt": "yuv420p",
                  "Remove": "false",
                  "Crop": "1280:800:0:140",
                  "Pad": "1280:800:0:140",
                  "LongShortMode": "false",
                  "Bufsize": "6000",
                  "Maxrate": "9000",
                  "AbrMax": "6000"
                },
                "Audio": {
                  "Codec": "AAC",
                  "Profile": "aac_low",
                  "Samplerate": "44100",
                  "Bitrate": "128",
                  "Channels": "2",
                  "Remove": "false",
                  "Volume": {
                    "Method": "auto",
                    "IntegratedLoudnessTarget": "-6",
                    "TruePeak": "-1",
                    "LoudnessRangeTarget": "8"
                  }
                },
                "Container": {
                  "Format": "mp4"
                },
                "MuxConfig": {
                  "Segment": {
                    "Duration": "10",
                    "ForceSegTime": "2,3"
                  }
                },
                "Tags": {
                  "key": ""
                }
              }
            },
            "ImageWatermarks": [
              {
                "TemplateId": "9547c6ad97cb4f2aaa29683ebd18d410",
                "OverwriteParams": {
                  "Width": "32",
                  "Height": "32",
                  "Dx": "10",
                  "Dy": "10",
                  "ReferPos": "TopLeft",
                  "Timeline": {
                    "Start": "00:00:05",
                    "Duration": "ToEND"
                  },
                  "File": {
                    "Type": "OSS",
                    "Media": "oss://bucket/path/to/video.mp4"
                  }
                }
              }
            ],
            "TextWatermarks": [
              {
                "TemplateId": "9547c6ad97cb4f2aaa29683ebd18d410",
                "OverwriteParams": {
                  "Content": "",
                  "FontName": "SimSun",
                  "FontColor": "#006400",
                  "FontAlpha": "1.0",
                  "Top": "10",
                  "Left": "10",
                  "FontSize": 16,
                  "BorderWidth": 0,
                  "BorderColor": "#006400",
                  "Adaptive": "false"
                }
              }
            ],
            "Subtitles": [
              {
                "TemplateId": "9547c6ad97cb4f2aaa29683ebd18d410",
                "OverwriteParams": {
                  "Format": "vtt",
                  "CharEnc": "UTF-8",
                  "File": {
                    "Type": "OSS",
                    "Media": "oss://bucket/path/to/video.mp4"
                  }
                }
              }
            ],
            "Encryption": {
              "EncryptType": "PrivateEncryption",
              "CipherText": "MTYi00NDU0LTg5O****",
              "DecryptKeyUri": "https://sample.com/path?CipherText=MTYi00NDU0LTg5O****"
            },
            "CombineConfigs": [
              {
                "AudioIndex": "",
                "VideoIndex": "",
                "Start": 0,
                "Duration": 20
              }
            ],
            "IsInheritTags": true
          }
        }
      ],
      "UserData": "user-data",
      "ScheduleConfig": {
        "PipelineId": "e37ebee5d98b4781897f6086e89f9c56",
        "Priority": 5
      }
    }
  ],
  "NextPageToken": "019daf5780f74831b0e1a767c9f1c178"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2022-09-20The response structure of the API has changedView Change Details
2022-07-11Add OperationView Change Details