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
AnalysisResultNotFounddikembalikan.
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
Test
RAM authorization
|
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.
|
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:
|
Success |
| AnalysisConfig |
object |
Konfigurasi pekerjaan. |
|
| QualityControl |
object |
The quality control on the job output. |
|
| MethodStreaming |
string |
The playback mode. Valid values:
|
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:
|
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 |
| 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.
|
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.
|
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.
|
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 |
| Crf |
string |
The constant rate factor.
|
27 |
| Gop |
string |
The maximum number of frames between two keyframes. Default value: 250. |
1 |
| Width |
string |
The width of the video.
|
1990 |
| Fps |
string |
The frame rate.
|
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:
|
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 |
| 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.
|
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.
|
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.