# 1.request Json example of creating task

{
  "type": 0,
  "uuid": "aslkfjalfksjalskfjalsfkjalksf",
  "data": {
    "callbackHost": "https://....:8443",
    "url": "https://.......mp4",
    "resourceType": 1
  }
}
Field Explain Type Mandatory
type task type,0-task type of transcoding int true
uuid Universally Unique Identifier String true
data detail information of task object true
callbackHost host of callbacking String true
url url of resource String true
resourceType resource type
1-video
2-audio
3-image
4-extract audio
int true

# 2.request Json example of callbacking task

# 1.callbacking of video transcoding

{
  "type": 0,
  "uuid": "aslkfjalfksjalskfjalsfkjalksf",
  "data": {
    "code": 0,
    "message": "success",
    "rightChannelFileUrl": "https://....data",
    "leftChannelFileUrl": "https://.....data",
    "audioDataFileUrl": "https://.......data",
    "singleSliceUrl": "https://.....mp4",
    "coverUrl": "https://.....jpg",
    "thumbnails": [
      {
        "time": 0,
        "url": "https://....jpg"
      }
    ],
    "needTranscodeAlphaChannel": false,
    "width": 1280,
    "height": 720,
    "duration": 6360000,
    "m3u8Url": "https://......m3u8"
  }
}
Field Explain Type
type type of task,0-type of transcoding int
uuid Universally Unique Identifier String
data detail information after task transcoding Object
code result code of task 0-success,others-failed int
message result information of task String
rightChannelFileUrl waveform url of right-channel String
leftChannelFileUrl waveform url of left-channel String
audioDataFileUrl url of audio file String
singleSliceUrl url of sinle-slice file String
coverUrl url of cover String
thumbnails object array of thumbnail Object[ ]
time timeline for thumbnail,in microsecond int
url url of thumbnail String
needTranscodeAlphaChannel contain alpha-channel or not boolean
width width of video long
height height of video long
duration duration time of video,in second long
m3u8Url url of m3u8 file String

# 2.callbacking of audio transcoding

{
  "type": 0,
  "uuid": "2dd79ba9-b321-4c1d-8bf1-2f91d1bc697c",
  "data": {
    "code": 0,
    "message": "success",
    "leftChannelFileUrl": "https://....data",
    "rightChannelFileUrl": "https://....l.data",
    "audioDataFileUrl": "https://......data",
    "duration": 259900000,
    "m3u8Url": "https://......m3u8"
  }
}
Field Explain Type
type type of task,0-type of transcoding int
uuid Universally Unique Identifier String
data detail information after task transcoding Object
code result code of task 0-success,others-failed int
message result information of task String
rightChannelFileUrl waveform url of right-channel String
leftChannelFileUrl waveform url of left-channel String
audioDataFileUrl url of audio file String
duration duration time of video,in second long
m3u8Url url of m3u8 file String

# 3.callbacking of image transcoding

{
  "type": 0,
  "uuid": "1ef615ed-3144-4594-bad5-bbc351cd0b011",
  "data": {
    "code": 0,
    "message": "success",
    "image": {
      "compressedUrl": "https://.....png",
      "thumbnailUrl": "https://......png"
    },
    "coverUrl": "https://......png",
    "width": 1800,
    "height": 4000,
    "m3u8Url": "https://......m3u8"
  }
}
Field Explain Type
type type of task, 0-type of transcoding int
uuid Universally Unique Identifier String
data detail information after task transcoding Object
code result code of task 0-success,others-failed int
message result information of task String
image url information after picture transcoding. Object
compressedUrl image url after compressing String
thumbnailsUrl url of thumbnail String
coverUrl url of cover String
width width of image long
height height of image long
m3u8Url url of m3u8 file String