All Products
Search
Document Center

ApsaraVideo Media Processing:SubmitAnalysisJob

Last Updated:Jun 11, 2026

Mengirimkan pekerjaan analisis templat preset.

Deskripsi operasi

  • Setelah Anda memanggil operasi SubmitAnalysisJob untuk mengirimkan pekerjaan analisis templat preset, ApsaraVideo Media Processing (MPS) secara cerdas menganalisis file input pekerjaan dan merekomendasikan templat preset yang sesuai. Anda dapat memanggil operasi QueryAnalysisJobList untuk meminta hasil analisis atau mengaktifkan notifikasi asinkron untuk menerima hasil analisis.

  • Hasil analisis hanya disimpan selama dua minggu setelah dihasilkan. Hasil analisis dihapus setelah dua minggu. Jika Anda menggunakan templat preset yang direkomendasikan dalam pekerjaan transcoding setelah dua minggu, pekerjaan akan gagal, dan kode kesalahan AnalysisResultNotFound dikembalikan.

Batas QPS

Anda dapat memanggil operasi ini hingga 100 kali per detik per akun. Permintaan yang melebihi batas ini akan dihilangkan dan Anda akan mengalami gangguan layanan. Kami menyarankan agar Anda memperhatikan batas ini saat memanggil operasi ini. Untuk informasi selengkapnya, lihat Batas QPS.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

mts:SubmitAnalysisJob

create

*全部资源

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

Input

string

Yes

Informasi input tentang pekerjaan analisis templat preset yang akan dikirimkan. Nilainya harus berupa objek JSON. Anda harus masuk ke konsol Object Storage Service (OSS) untuk memberikan izin baca pada bucket OSS yang ditentukan kepada MPS. Untuk informasi selengkapnya, lihat bagian "Input" pada topik Detail parameter.

Catatan

Bucket OSS harus berada di region yang sama dengan layanan MPS Anda.

{"Bucket":"example-bucket","Location":"oss-cn-hangzhou","Object":"example.flv"}

AnalysisConfig

string

No

Konfigurasi pekerjaan. Tetapkan parameter ini sesuai kebutuhan. Untuk informasi selengkapnya, lihat bagian "AnalysisConfig" pada topik Detail parameter.

{"QualityControl":{"RateQuality":25,"MethodStreaming":"network"}}

UserData

string

No

Data kustom. Data kustom dapat berisi huruf, angka, dan tanda hubung (-), dan dapat memiliki panjang hingga 1.024 byte. Data kustom tidak boleh dimulai dengan karakter khusus.

testid-001

PipelineId

string

Yes

ID antrean MPS tempat pekerjaan dikirimkan. Untuk melihat ID antrean MPS, masuk ke MPS console dan pilih Global Settings > Pipelines di panel navigasi sebelah kiri. Jika Anda ingin mengaktifkan notifikasi asinkron, pastikan antrean MPS terikat ke topik Message Service (MNS).

bb558c1cc25b45309aab5be44d19****

Priority

string

No

Prioritas pekerjaan dalam antrean MPS tempat pekerjaan dikirimkan.

  • Nilai yang valid: 1 to 10. Nilai 10 menunjukkan prioritas tertinggi.

  • Nilai default: 6.

10

Elemen respons

Element

Type

Description

Example

object

Parameter respons.

RequestId

string

ID permintaan.

B52658D4-07AB-43CD-82B0-210958A65E23

AnalysisJob

object

Informasi tentang pekerjaan analisis templat preset yang dikirimkan.

CreationTime

string

Waktu pekerjaan dibuat.

2014-01-10T12:00:00Z

Percent

integer

Progres transcoding.

100

State

string

Status pekerjaan. Nilai yang valid:

  • Submitted: Pekerjaan telah dikirimkan.

  • Analyzing: Pekerjaan sedang dijalankan.

  • Success: Pekerjaan berhasil.

  • Fail: Pekerjaan gagal.

Success

AnalysisConfig

object

Konfigurasi pekerjaan.

QualityControl

object

The quality control on the job output.

MethodStreaming

string

The playback mode. Valid values:

  • network: online playback

  • local: playback on local devices

  • Default value: network.

network

RateQuality

string

The quality level of the output file.

50

PropertiesControl

object

The control on the attributes of the job output.

Deinterlace

string

Indicates whether deinterlacing was forced to run. Valid values:

  • Auto: Deinterlacing was automatically run.

  • Force: Deinterlacing was forced to run.

  • None: Deinterlacing was forced not to run.

Force

Crop

object

The cropping configurations of video images.

Top

string

The top margin that was cropped out.

Catatan

This parameter is invalid if the Mode parameter is set to Auto or None.

8

Width

string

The width of the video after the margins were cropped out.

Catatan

This parameter is invalid if the Mode parameter is set to Auto or None.

8

Height

string

The height of the video after the margins were cropped out.

Catatan

This parameter is invalid if the Mode parameter is set to Auto or None.

8

Left

string

The left margin that was cropped out.

Catatan

This parameter is invalid if the Mode parameter is set to Auto or None.

8

Mode

string

The cropping mode. Valid values:

  • Auto: Cropping was automatically run. This is the default value.

  • Force: Cropping was forced to run.

  • None: Cropping was forced not to run.

Auto

Message

string

Pesan kesalahan yang dikembalikan jika pekerjaan gagal.

The resource operated \"PipelineId\" cannot be found

Priority

string

Prioritas pekerjaan dalam antrean MPS tempat pekerjaan dikirimkan.

  • Nilai yang valid: 1 to 10. Nilai 10 menunjukkan prioritas tertinggi.

  • Nilai default: 10.

10

MNSMessageResult

object

Pesan yang dikirim oleh MNS untuk memberi tahu pengguna tentang hasil pekerjaan.

MessageId

string

The ID of the message returned if the job was successful. This parameter is not returned if the job failed.

3ca84a39a9024f19853b21be9cf9****

ErrorMessage

string

The error message returned if the job failed. This parameter is not returned if the job was successful.

The resource operated \"PipelineId\" cannot be found

ErrorCode

string

The error code returned if the job failed. This parameter is not returned if the job was successful.

InvalidParameter.ResourceNotFound

TemplateList

object

Template

array<object>

The matched preset templates.

array<object>

The information about the preset template.

Video

object

The video codec configurations.

Bufsize

string

The size of the buffer.

  • Unit: KB.

  • Default value: 6000.

5000

Degrain

string

The strength of the independent noise reduction algorithm.

5

BitrateBnd

object

The average bitrate range of the video.

Max

string

The upper limit of the total bitrate. Unit: Kbit/s.

20

Min

string

The lower limit of the total bitrate. Unit: Kbit/s.

10

PixFmt

string

The pixel format for video color encoding. Valid values: standard pixel formats such as yuv420p and yuvj420p.

yuvj420p

Codec

string

The video codec. Default value: H.264.

H.264

Height

string

The height of the video.

  • Unit: pixel.

  • Default value: the height of the input video.

1880

Qscale

string

The level of quality control on the video.

15

Bitrate

string

The average bitrate of the video. Unit: Kbit/s.

10

Maxrate

string

The maximum bitrate of the video. Unit: Kbit/s.

10

Profile

string

The codec profile. Valid values:

  • baseline: applicable to mobile devices.

  • main: applicable to standard-definition devices.

  • high: applicable to high-definition devices.

  • Default value: high.

baseline

Crf

string

The constant rate factor.

  • Default value if the Codec parameter is set to H.264: 23. Default value if the Codec parameter is set to H.265: 26.

  • If this parameter is returned, the setting of the Bitrate parameter is invalid.

27

Gop

string

The maximum number of frames between two keyframes. Default value: 250.

1

Width

string

The width of the video.

  • Unit: pixel.

  • Default value: the width of the input video.

1990

Fps

string

The frame rate.

  • The value is 60 if the frame rate of the input video exceeds 60.

  • Default value: the frame rate of the input video.

60

Preset

string

The preset video algorithm. Valid values: veryfast, fast, medium, slow, and slower. Default value: medium.

medium

ScanMode

string

The scan mode. Valid values:

  • interlaced

  • progressive

progressive

TransConfig

object

The general transcoding configurations.

TransMode

string

The transcoding mode. Valid values: onepass, twopass, and CBR. Default value: onepass.

onepass

State

string

The status of the template.

  • Normal: The template is normal.

  • Deleted: The template is deleted.

Normal

MuxConfig

object

The transmuxing configurations.

Gif

object

The transmuxing configurations for the GIF format.

FinalDelay

string

The interval between two consecutive loops for the GIF format. Unit: 0.01s. For example, a value of 500 indicates 5 seconds.

0

Loop

string

The number of loops for the GIF or WebP format. Default value: 0.

0

Segment

object

The segment configurations.

Duration

string

The length of the segment. Unit: seconds.

60

Name

string

The name of the template.

FLV-UD

Audio

object

The audio codec configurations.

Profile

string

The codec profile of the audio. Valid values if the Codec parameter is set to aac: aac_low, aac_he, aac_he_v2, aac_ld, and aac_eld.

aac_low

Codec

string

The audio codec format. Default value: acc.

mp3

Samplerate

string

The sampling rate.

  • Unit: Hz.

  • Default value: 44100.

32000

Qscale

string

The level of quality control on the audio.

10

Channels

string

The number of sound channels. Default value: 2.

1

Bitrate

string

The audio bitrate of the output file.

  • Unit: Kbit/s.

  • Default value: 128.

8

Id

string

The ID of the transcoding template.

S00000000-00****

Container

object

The container format configurations.

Format

string

The container format.

flv

UserData

string

Data kustom.

testid-001

Code

string

Kode kesalahan yang dikembalikan jika pekerjaan gagal. Parameter ini tidak dikembalikan jika pekerjaan berhasil.

InvalidParameter.ResourceNotFound

InputFile

object

Informasi tentang input pekerjaan.

Object

string

The name of the OSS object that is used as the input file.

example.flv

Location

string

The ID of the OSS region.

oss-cn-hangzhou

Bucket

string

The name of the OSS bucket.

example-bucket

PipelineId

string

ID antrean MPS tempat pekerjaan analisis dikirimkan.

bb558c1cc25b45309aab5be44d19****

Id

string

ID pekerjaan analisis templat.

57f6aa3f84824309bcba67231b40****

Contoh

Respons sukses

JSONformat

{
  "RequestId": "B52658D4-07AB-43CD-82B0-210958A65E23",
  "AnalysisJob": {
    "CreationTime": "2014-01-10T12:00:00Z",
    "Percent": 100,
    "State": "Success",
    "AnalysisConfig": {
      "QualityControl": {
        "MethodStreaming": "network",
        "RateQuality": "50"
      },
      "PropertiesControl": {
        "Deinterlace": "Force",
        "Crop": {
          "Top": "8",
          "Width": "8",
          "Height": "8",
          "Left": "8",
          "Mode": "Auto"
        }
      }
    },
    "Message": "The resource operated \\\"PipelineId\\\" cannot be found",
    "Priority": "10",
    "MNSMessageResult": {
      "MessageId": "3ca84a39a9024f19853b21be9cf9****",
      "ErrorMessage": "The resource operated \\\"PipelineId\\\" cannot be found",
      "ErrorCode": "InvalidParameter.ResourceNotFound"
    },
    "TemplateList": {
      "Template": [
        {
          "Video": {
            "Bufsize": "5000",
            "Degrain": "5",
            "BitrateBnd": {
              "Max": "20",
              "Min": "10"
            },
            "PixFmt": "yuvj420p",
            "Codec": "H.264",
            "Height": "1880",
            "Qscale": "15",
            "Bitrate": "10",
            "Maxrate": "10",
            "Profile": "baseline",
            "Crf": "27",
            "Gop": "1",
            "Width": "1990",
            "Fps": "60",
            "Preset": "medium",
            "ScanMode": "progressive"
          },
          "TransConfig": {
            "TransMode": "onepass"
          },
          "State": "Normal",
          "MuxConfig": {
            "Gif": {
              "FinalDelay": "0",
              "Loop": "0"
            },
            "Segment": {
              "Duration": "60"
            }
          },
          "Name": "FLV-UD",
          "Audio": {
            "Profile": "aac_low",
            "Codec": "mp3",
            "Samplerate": "32000",
            "Qscale": "10",
            "Channels": "1",
            "Bitrate": "8"
          },
          "Id": "S00000000-00****",
          "Container": {
            "Format": "flv"
          }
        }
      ]
    },
    "UserData": "testid-001",
    "Code": "InvalidParameter.ResourceNotFound",
    "InputFile": {
      "Object": "example.flv",
      "Location": "oss-cn-hangzhou",
      "Bucket": "example-bucket"
    },
    "PipelineId": "bb558c1cc25b45309aab5be44d19****",
    "Id": "57f6aa3f84824309bcba67231b40****"
  }
}

Kode kesalahan

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.