Upload video files and capture motion
- Calls the GetUploadUrl API and returns the following.
- “uploadUrl”
- “headers”
- “fileKey”
- Upload a video file using the following parameters.
- HTTP Method: PUT
- Header
- ‘x-amz-tagging’: ‘state=uploaded’
- URL: upload URL
- body<binary>: video file
- 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.