All Products
Search
Document Center

Intelligent Media Services:SubmitMediaInfoJob

Last Updated:Dec 16, 2024

Submits a media information analysis job in asynchronous mode.

Operation description

You can call this operation to analyze an input media file by using a callback mechanism or initiating subsequent queries. This operation is suitable for scenarios in which real-time performance is less critical and high concurrency is expected.

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:SubmitMediaInfoJob
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
NamestringNo

The job name.

job-name
InputobjectYes

The input of the job.

TypestringYes

The type of the media object. Valid values: OSS and Media. A value of OSS indicates an Object Storage Service (OSS) object. A value of Media indicates a media asset.

OSS
MediastringYes

The media object.

  • If Type is set to OSS, set this parameter to the URL of an OSS object. Both the OSS and HTTP protocols are supported.
Note Before you use the OSS bucket in the URL, you must add the bucket on the Storage Management page of the Intelligent Media Services (IMS) console.
  • If Type is set to Media, set this parameter to the ID of a media asset.
oss://bucket/path/to/video.mp4
UserDatastringNo

The user data.

user-data
ScheduleConfigobjectNo

The scheduling parameters.

PipelineIdstringNo

The ID of the ApsaraVideo Media Processing (MPS) queue that is used to run the job.

e37ebee5d98b4781897f6086e89f9c56
PriorityintegerNo

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

5

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

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

MediaInfoJobDTO

Namestring

The job name.

job-name
TriggerSourcestring

The source of the job. Valid values: API, WorkFlow, and Console.

API
JobIdstring

The job ID.

ab4802364a2e49208c99efab82dfa8e8
Inputobject

The input of the job.

Typestring

The type of the media object. Valid values: OSS and Media. A value of OSS indicates an OSS object. A value of Media indicates 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, set this parameter to the ID of a media asset.

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

Indicates whether asynchronous processing was performed.

true
UserDatastring

The user data.

user-data
ScheduleConfigobject

The scheduling information.

PipelineIdstring

The ID of the ApsaraVideo Media Processing (MPS) queue that is used to run the job.

e37ebee5d98b4781897f6086e89f9c56
Priorityinteger

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

5
Statusstring

The state of the job. Valid values: Init (the job is submitted), Success (the job is successful), and Fail (the job failed).

Init
SubmitResultJsonobject

The job submission information.

{}
MediaInfoPropertyobject

The details of the media information.

FileBasicInfoobject

The basic file information.

MediaIdstring

The ID of the media asset.

2b36bd19c13f4145b094c0cad80dbce5
FileNamestring

The file name.

file.m3u8
FileStatusstring

The state of the file.

Normal
FileTypestring

The file type.

source_file
FileSizestring

The file size.

31737
FileUrlstring

The URL of the file.

http://bucket.oss-cn-shanghai.aliyuncs.com/path/to/file.m3u8
Regionstring

The region in which the file resides.

cn-shanghai
FormatNamestring

The name of the video format.

hls,applehttp
Durationstring

The duration of the video.

403.039999
Bitratestring

The video bitrate.

888.563
Widthstring

The width of the output video.

848
Heightstring

The height of the output video.

478
AudioStreamInfoListarray<object>

The information about the audio stream.

AudioStreamInfoListobject

The information about the audio stream.

Indexstring

The sequence number of the stream.

1
CodecNamestring

The encoding format.

aac
CodecLongNamestring

The name of the encoding format.

AAC (Advanced Audio Coding)
CodecTimeBasestring

The time base of the encoder.

1/44100
CodecTagStringstring

The name of the encoder tag.

[15][0][0][0]
CodecTagstring

The encoder tag.

0x000f
SampleFmtstring

The sample format.

fltp
SampleRatestring

The sampling rate. Unit: Hz.

44100
Channelsstring

The number of sound channels.

2
ChannelLayoutstring

The sound channel layout.

stereo
Timebasestring

The time base.

1/90000
StartTimestring

The start time of the stream.

1.473556
Durationstring

The duration of the stream. Unit: seconds.

403.039989
Bitratestring

The bitrate.

0.f
Langstring

The language of the stream.

us
VideoStreamInfoListarray<object>

The information about the video stream.

VideoStreamInfoListobject

The information about the video stream.

Indexstring

The sequence number of the stream.

0
Codec_namestring

The encoding format.

h264
Codec_long_namestring

The name of the encoding format.

H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
Profilestring

The encoder profile.

High
Codec_time_basestring

The time base of the encoder.

1/50
Codec_tag_stringstring

The tag string of the encoding format.

[27][0][0][0]
Codec_tagstring

The tag of the encoding format.

0x001b
Widthstring

The width of the output video.

848
Heightstring

The height of the output video.

478
Has_b_framesstring

Indicates whether the video stream contains bidirectional frames (B-frames). Valid values:

  • 0: The stream contains no B-frames.
  • 1: The stream contains one B-frame.
  • 2: The stream contains multiple consecutive B-frames.
2
Sarstring

The aspect ratio of the area from which the sampling points are collected.

478:477
Darstring

The display aspect ratio.

16:9
PixFmtstring

The pixel format.

yuv420p
Levelstring

The codec level.

31
Fpsstring

The frame rate.

25.0
Avg_fpsstring

The average frame rate.

25.0
Time_basestring

The time base.

1/90000
Start_timestring

The start time of the stream.

1.473556
Durationstring

The duration of the file.

403.039989
Bit_ratestring

The bitrate.

888.563
NumFramesstring

The total number of frames.

10040
Langstring

The language of the stream.

zh
Rotatestring

The rotation angle of the video image.

0
SubmitTimestring

The time when the job was submitted.

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

The time when the job was complete.

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

The request ID.

4879B9DE-E4B6-19DC-91F5-9D5F4DCE4168

Examples

Sample success responses

JSONformat

{
  "RequestId": "31E30781-9495-5E2D-A84D-759B0A01E262",
  "MediaInfoJob": {
    "Name": "job-name",
    "TriggerSource": "API",
    "JobId": "ab4802364a2e49208c99efab82dfa8e8",
    "Input": {
      "Type": "OSS",
      "Media": "oss://bucket/path/to/video.mp4"
    },
    "Async": true,
    "UserData": "user-data",
    "ScheduleConfig": {
      "PipelineId": "e37ebee5d98b4781897f6086e89f9c56",
      "Priority": 5
    },
    "Status": "Init",
    "SubmitResultJson": {},
    "MediaInfoProperty": {
      "FileBasicInfo": {
        "MediaId": "2b36bd19c13f4145b094c0cad80dbce5",
        "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": "us"
        }
      ],
      "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": "zh",
          "Rotate": "0"
        }
      ]
    },
    "SubmitTime": "2022-01-12T08:49:41Z",
    "FinishTime": "2022-01-12T08:49:41Z",
    "RequestId": "4879B9DE-E4B6-19DC-91F5-9D5F4DCE4168"
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
2022-08-10The internal configuration of the API is changed, but the call is not affectedView Change Details
2022-07-11Add OperationView Change Details