調用QueryVideoQualityJob查詢視頻質量審核作業的狀態與結果。

使用說明

  • 本接口目前支持的地域為華東2(上海)。
  • 本接口通過視頻質量審核作業的ID對作業結果進行查詢。

QPS限制

本接口的單用戶QPS限制為50次/秒。超過限制,API調用會被限流,這可能會影響您的業務,請合理調用。更多信息,請參見QPS限制

調試

您可以在OpenAPI Explorer中直接運行該接口,免去您計算簽名的困擾。運行成功后,OpenAPI Explorer可以自動生成SDK代碼示例。

請求參數

名稱 類型 是否必選 示例值 描述
Action String QueryVideoQualityJob

系統規定參數,取值:QueryVideoQualityJob

UserId Long 125340688170****

用戶ID。可以通過MPS控制臺頂部導航欄左側單擊頭像查看。

JobId String 7c2abbb270474c98823dac56cc06****

需要查詢的視頻質量審核作業ID。可以從提交視頻質量審核作業的返回參數中獲取。

返回數據

名稱 類型 示例值 描述
Message String The job is completed successfully

作業信息。

RequestId String 5210DBB0-E327-4D45-ADBC-0B83C8796E26

請求ID。

Job Object

作業詳情。

Status String Success

作業狀態。可取值:

  • Success:處理成功。
  • Fail:處理失敗。
  • Processing:處理中。
  • Submitted:已提交等待處理。
JobId String 0c8f04aa60bd4377a906bd6c91ec****

作業ID。

UserId Long 125340688170****

用戶ID。

VideoQualityResults String {"LessExpose":[{"Ratio":"0.917673658134****","TimeStamp":"00:00:10.0"}],"Noise":[{"Ratio":"0.0419343847352","TimeStamp":"00:00:05.0"}],"ImageDefinition":[{"TimeStamp":"00:00:05.0"},{"TimeStamp":"00:00:10.0"}],"Border":[{"TimeStamp":"00:00:05.0"},{"TimeStamp":"00:00:10.0"}],"Freeze":[{"Score":"1","TimeStamp":"00:00:00.233"},{"Score":"1","TimeStamp":"00:00:02.600"},{"Score":"1","TimeStamp":"00:00:02.900"},{"Score":"1","TimeStamp":"00:00:02.933"},{"Score":"1","TimeStamp":"00:00:03.400"},{"Score":"1","TimeStamp":"00:00:05.166"},{"Score":"1","TimeStamp":"00:00:05.800"},{"Score":"1","TimeStamp":"00:00:07.700"},{"Score":"1","TimeStamp":"00:00:07.800"},{"Score":"1","TimeStamp":"00:00:08.633"},{"Score":"1","TimeStamp":"00:00:08.833"},{"Score":"1","TimeStamp":"00:00:09.0"}]}

審核結果摘要,有質量問題的圖片信息列表,不含坐標信息。

Message String The job is completed successfully

作業信息。

Output String oss://example-bucket-****.oss-cn-shanghai.aliyuncs.com/example1.txt

審核結果匯總,存放于用戶提供的輸出文件OSS地址。例如:oss://example-bucket-****.oss-cn-shanghai.aliyuncs.com/example1.txt,用戶根據需要解析。

說明 格式示例: {"審核標簽一":[ {問題幀一}, {問題幀二}, ... , {問題幀N}]} {"審核標簽二":[ {問題幀一}, {問題幀二}, ... , {問題幀N}]} ... {"審核標簽N":[ {問題幀一}, {問題幀二}, ... , {問題幀N}]}
Code String Success

錯誤碼。請求成功時返回Success。

VideoQualityResults示例


"VideoQualityResults":{
  "Blockness":[
      {
        "TimeStamp":"hh:mm:ss[.SSS]",
        "Score":"0.33"
     },
     {
        "TimeStamp":"hh:mm:ss[.SSS]",
        "Score":"0.66"
     }
  ],
  "Brightness":[
     {
        "TimeStamp":"hh:mm:ss[.SSS]",
        "Result":"white",
        "Score":"0.33"
     },
     {
        "TimeStamp":"hh:mm:ss[.SSS]",
        "Result":"white",
        "Score":"0.66"
     }
  ],
  "Freeze":[
      {
        "TimeStamp":"hh:mm:ss[.SSS]",
        "Score":"0.33"
     },
     {
        "TimeStamp":"hh:mm:ss[.SSS]",
        "Score":"0.66"
     }
  ],
  "ImageDefinition":[
     {
       "TimeStamp":"hh:mm:ss[.SSS]"
     },
     {
       "TimeStamp":"hh:mm:ss[.SSS]",
     }
  ],
  "LessExpose":[
      {
        "TimeStamp":"hh:mm:ss[.SSS]",
        "Ratio":"0.33"
     },
     {
        "TimeStamp":"hh:mm:ss[.SSS]",
        "Ratio":"0.66"
     }
  ],
  "OverExpose":[
      {
        "TimeStamp":"hh:mm:ss[.SSS]",
        "Ratio":"0.33"
     },
     {
        "TimeStamp":"hh:mm:ss[.SSS]",
        "Ratio":"0.66"
     }
  ],
  "Border":[
      {
        "TimeStamp":"hh:mm:ss[.SSS]"
     },
     {
        "TimeStamp":"hh:mm:ss[.SSS]"
     }
  ],
  "Noise":[
      {
        "TimeStamp":"hh:mm:ss[.SSS]",
        "Ratio":"0.33"
     },
     {
        "TimeStamp":"hh:mm:ss[.SSS]",
        "Ratio":"0.66"
     }
  ],
  "Mosaic":[
      {
        "TimeStamp":"hh:mm:ss[.SSS]"
     },
     {
        "TimeStamp":"hh:mm:ss[.SSS]"
     }
  ]
  }

Output示例


{
	"brightness": [{
		"result": "dark",
		"score": -2.5150070190429688,
		"timestamp": "5520",
		"type": "brightness"
	}, {
		"result": "dark",
		"score": -2.1238651275634766,
		"timestamp": "344000",
		"type": "brightness"
	}]
} {
	"blockness": [{
		"result": "blocking",
		"score": 4.1806020736694336,
		"timestamp": "160",
		"type": "blockness"
	}, {
		"result": "blocking",
		"score": 4.515049934387207,
		"timestamp": "240",
		"type": "blockness"
	}]
} {
	"freeze": [{
		"result": "freeze",
		"score": 4.1445174217224121,
		"timestamp": "202240",
		"type": "freeze"
	}]
} {
	"border": [{
		"border": [0, 0, 1280, 720],
		"id": 25,
		"timestamp": 1000.0
	}, {
		"border": [1, 0, 1279, 720],
		"id": 50,
		"timestamp": 2000.0
	}]
} {
	"mosaic": [{
		"box": [
			[294, 59, 328, 93],
			[124, 98, 168, 142],
			[268, 109, 300, 141],
			[162, 109, 194, 141],
			[268, 76, 300, 108],
			[162, 59, 194, 91],
			[94, 73, 130, 109],
			[94, 28, 130, 64],
			[294, 94, 328, 128],
			[222, 21, 266, 65],
			[203, 21, 247, 65],
			[241, 33, 273, 65],
			[190, 59, 220, 89],
			[333, 59, 367, 93],
			[314, 59, 358, 103],
			[124, 53, 168, 97],
			[361, 59, 391, 89],
			[1029, 77, 1057, 105],
			[349, 59, 379, 89]
		],
		"id": 25,
		"timestamp": 1000.0
	}, {
		"box": [
			[241, 33, 273, 65],
			[228, 33, 260, 65],
			[189, 81, 221, 113],
			[336, 75, 366, 105],
			[254, 21, 298, 65],
			[163, 60, 205, 102],
			[320, 59, 354, 93],
			[125, 97, 169, 141],
			[221, 39, 247, 65]
		],
		"id": 50,
		"timestamp": 2000.0
	}]
} {
	"over_expose": [{
		"ratio": "0.97276288701703",
		"id": 25,
		"timestamp": 1000.0
	}, {
		"ratio": "0.8629491725526869",
		"id": 50,
		"timestamp": 2000.0
	}]
}

視頻質量審核結果算法各字段含義

花屏識別(blockness)

字段

含義

result

檢測結果:blocking和normal

score

結果置信度

timestamp

問題幀發生時間,單位:ms。

黑屏、白屏(brightness)

字段

含義

result

檢測結果:dark,bright,black,white,normal

score

結果置信度

timestamp

問題幀發生時間,單位:ms。

靜幀(freeze)

字段

含義

result

檢測結果:freeze,normal

score

結果置信度

timestamp

問題幀發生時間,單位:ms。

模糊識別(image_definition)

字段

含義

id

問題幀

timestamp

問題幀發生時間,單位:ms。

低光照識別(less_expose)

字段

含義

ratio

欠曝比例

id

問題幀

timestamp

問題幀發生時間,單位:ms。

過曝光識別(over_expose)

字段

含義

ratio

過曝比例

id

問題幀

timestamp

問題幀發生時間,單位:ms。

黑邊、白邊(border)

字段

含義

border

圖片的位置 [x1,y1,x2,y2]

id

問題幀

timestamp

問題幀發生時間,單位:ms。

馬賽克識別(mosaic)

字段

含義

box

馬賽克位置[x1,y1,x2,y2]

id

問題幀

timestamp

問題幀發生時間,單位:ms。

雪花/噪點識別(noise)

字段

含義

noise_rate

噪聲比例

id

問題幀

timestamp

問題幀發生時間,單位:ms。

示例

請求示例

http(s)://mts.cn-shanghai.aliyuncs.com/?Action=QueryVideoQualityJob
&JobId=7c2abbb270474c98823dac56cc06****
&<公共請求參數>

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<QueryVideoQualityJobResponse>
    <Message>The job is completed successfully</Message>
    <RequestId>5210DBB0-E327-4D45-ADBC-0B83C8796E26</RequestId>
    <Job>
        <Status>Success</Status>
        <JobId>0c8f04aa60bd4377a906bd6c91ec****</JobId>
        <VideoQualityResults>{"LessExpose":[{"Ratio":"0.917673658134****","TimeStamp":"00:00:10.0"}],"Noise":[{"Ratio":"0.0419343847352","TimeStamp":"00:00:05.0"}],"ImageDefinition":[{"TimeStamp":"00:00:05.0"},{"TimeStamp":"00:00:10.0"}],"Border":[{"TimeStamp":"00:00:05.0"},{"TimeStamp":"00:00:10.0"}],"Freeze":[{"Score":"1","TimeStamp":"00:00:00.233"},{"Score":"1","TimeStamp":"00:00:02.600"},{"Score":"1","TimeStamp":"00:00:02.900"},{"Score":"1","TimeStamp":"00:00:02.933"},{"Score":"1","TimeStamp":"00:00:03.400"},{"Score":"1","TimeStamp":"00:00:05.166"},{"Score":"1","TimeStamp":"00:00:05.800"},{"Score":"1","TimeStamp":"00:00:07.700"},{"Score":"1","TimeStamp":"00:00:07.800"},{"Score":"1","TimeStamp":"00:00:08.633"},{"Score":"1","TimeStamp":"00:00:08.833"},{"Score":"1","TimeStamp":"00:00:09.0"}]}</VideoQualityResults>
        <Message>The job is completed successfully</Message>
        <Output>oss://example-bucket-****.oss-cn-shanghai.aliyuncs.com/example1.txt</Output>
    </Job>
    <Code>Success</Code>
</QueryVideoQualityJobResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Message" : "The job is completed successfully",
  "RequestId" : "5210DBB0-E327-4D45-ADBC-0B83C8796E26",
  "Job" : {
    "Status" : "Success",
    "JobId" : "0c8f04aa60bd4377a906bd6c91ec****",
    "VideoQualityResults" : "{\"LessExpose\":[{\"Ratio\":\"0.917673658134****\",\"TimeStamp\":\"00:00:10.0\"}],\"Noise\":[{\"Ratio\":\"0.0419343847352\",\"TimeStamp\":\"00:00:05.0\"}],\"ImageDefinition\":[{\"TimeStamp\":\"00:00:05.0\"},{\"TimeStamp\":\"00:00:10.0\"}],\"Border\":[{\"TimeStamp\":\"00:00:05.0\"},{\"TimeStamp\":\"00:00:10.0\"}],\"Freeze\":[{\"Score\":\"1\",\"TimeStamp\":\"00:00:00.233\"},{\"Score\":\"1\",\"TimeStamp\":\"00:00:02.600\"},{\"Score\":\"1\",\"TimeStamp\":\"00:00:02.900\"},{\"Score\":\"1\",\"TimeStamp\":\"00:00:02.933\"},{\"Score\":\"1\",\"TimeStamp\":\"00:00:03.400\"},{\"Score\":\"1\",\"TimeStamp\":\"00:00:05.166\"},{\"Score\":\"1\",\"TimeStamp\":\"00:00:05.800\"},{\"Score\":\"1\",\"TimeStamp\":\"00:00:07.700\"},{\"Score\":\"1\",\"TimeStamp\":\"00:00:07.800\"},{\"Score\":\"1\",\"TimeStamp\":\"00:00:08.633\"},{\"Score\":\"1\",\"TimeStamp\":\"00:00:08.833\"},{\"Score\":\"1\",\"TimeStamp\":\"00:00:09.0\"}]}",
    "Message" : "The job is completed successfully",
    "Output" : "oss://example-bucket-****.oss-cn-shanghai.aliyuncs.com/example1.txt"
  },
  "Code" : "Success"
}

錯誤碼

訪問錯誤中心查看更多錯誤碼。