Get Trimming Task Status

最終更新日:2022-01-07 14:31:40

Description

This interface allows us to query the trimming task status.

Request Description

Request method POST/GET
Interface Address https://api.cloudv.haplat.net/vod/videoManage/videoClipQuery
If token is needed The verification token is needed

Request Parameter

Parameter Type Required Remarks
transNo string Yes Transaction ID of trimming task, the length of the ID should be less than or equal to 32 charaters.

Return Parameter

The details of general return results can be found at Return Result.

The structure of returned data when the result is successful:

Parameter Type Description
taskId string Task ID
transNo string Transaction ID
status int 1 (processing)
2 (successful)
3 (failed)
videoInfo obj There will be values return only when the task is successful.

videoInfo field details:

Parameter Type Description
videoName string Video name
videoId string Video ID
encrypt int Whether to encrypt the transcoded file:
0 (unencrypted)
1 (encrypted)
videoSize string The total size of original video and transcoded videos.
videoDuration string Video duration
uploadTime string Video upload time
updateTime string Video modification time
videoDescription string Video description
videoClassification string Video classification
imageUrl string Video poster image URL
publishDomain string Video publishing domain
playerName string The name of the player template used by the video
playerId string The ID of the player template used by the video
videoState string Video status:
0 (enabled)
1 (disabled)
transcodeState string Transcoding status codes when video encryption is not enabled:
1 (transcoded)
2 (not transcoded)
3 (transcoding)
4 (Failed to transcode)

Transcoding status codes when video encryption is enabled:
1 (encrypted and transcoded)
2 (non-encrypted transcoding)
3 (transcoding)
4 (Failed to transcode)
5 (not transcoded)
videoSourceCode int Video source:
0 (other)
1 (uploaded)
2 (Live to VoD recording)
3 (Video pulling)
4 (Video Trimming)
5 (Video splicing)
6 (Edge pull streaming recording)
10 (Universal version of live recording)
11 (Upload SDK)
12 (upload tool)
videoResolutions array Video quality and other information

VideoResolutions data structure:

Parameter Type Description
clarity int Quality:
1 (Original quality)
2 (LD)
3 (SD)
4 (HD)
5 (UHD)
-99 (Recorded file)
serverType int Terminal type:
0 (PC)
1 (original video)
height int height
width int width
fileSize long File size in bits

Example

Input Example

curl -X POST http://api.cloudv.haplat.net/vod/videoManage/videoClipQuery 
  -H 'content-type: application/x-www-form-urlencoded; charset=utf-8' 
  -H "Host: api.cloudv.haplat.net" 
  <公共的头部参数>
  <自定义的头部参数>
 -d 'transNo=036b6f4a01611000a79c3a7800000000'

Notes: For the “public parameter” in the example, please refer to Common Parameters.

Output Example

{
    "code": 200,
    "data": {
        "status": 2,
        "taskId": "036b6fb401611000be5f693600000000",
        "transNo": "036b6f4a01611000a79c3a7800000000",
        "videoInfo": {
            "encrypt": 1,
            "playerId": "DF2DAF233DDA",
            "playerName": "基础播放器",
            "imageUrl": "http://ovptest.haplat.net/clip/2018-01-17/036b6fb401611000431d330300000000/cloudv-cover/DC543253DFA4D22C9ABF3F76721E54E7.jpg",
            "publishDomain": "ovptest.haplat.net",
            "transcodeState": "1",
            "updateTime": "1516182478",
            "uploadTime": "1516180828",
            "videoClassification": "",
            "videoDescription": "",
            "videoDuration": "189",
            "videoId": "DC543253DFA4D22C9ABF3F76721E54E7",
            "videoName": "3234234",
            "videoResolutions": [
                {
                    "clarity": 1,
                    "fileSize": 14937188,
                    "height": 360,
                    "serverType": -1,
                    "width": 640
                },
                {
                    "clarity": 2,
                    "fileSize": 9204528,
                    "height": 360,
                    "serverType": 0,
                    "width": 640
                },
                {
                    "clarity": 3,
                    "fileSize": 15184451,
                    "height": 480,
                    "serverType": 0,
                    "width": 720
                }
            ],
            "videoSize": "39326167",
            "videoSourceCode": 4,
            "videoState": "0"
        }
    },
    "message": "操作成功"
}

Error Code

The following error codes are related to interface service logic. And for common code please refer to Return Result.

Error code Description
1560 Video is being processed
1601 TRANSNO cannot be empty
1602 TRANSNO is illegal
1603 TRANSNO does not exist