Upload video files and capture motion

 

  1. Calls the GetUploadUrl API and returns the following.
    1. “uploadUrl”
    2. “headers”
    3. “fileKey”
  2. Upload a video file using the following parameters.
    1. HTTP Method: PUT
    2. Header
      1. ‘x-amz-tagging’: ‘state=uploaded’
    3. URL: upload URL
    4. body<binary>: video file
  3. Call the ExtractMotionCapture API and check if the operation is in progress without any errors, as shown below.
{
"commandId": "988d71275d4d34a70cce0f55b6dd8e7c",
"commandStatus": "working"
}
4.  Using the FileKey returned in step 1, call the GetMocapResult API at regular intervals to wait for the motion capture operation to end.
{
"videoFileKey": "video-c9f672cae755.mov",
"motionFileKey": "motion-c9f672cae755.json",
"userId": "sunho+test09@plask.ai",
"createdAt": "2022-06-17T06:20:50.829Z",
"elapsedSec": 18.713,
"details": {
"isMultiPerson": false,
"videoFrames": 164,
"videoLengthSec": 5.113333
},
"isError": "false",
"error": ""
}
5.  Call GetMotionFileDownloadUrl API using the “motionFileKey” value of step 4 response to return the download URL and download the motion file.