objectDetectForVideo(params: Object)
Requires:
AIKit≥1.1.0@ray-js/ray≥1.6.29
Platforms:
iOSAndroid
Description
Run object recognition on a video
Parameters
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
inputVideoPath | string | Yes | - | Video input path |
outputVideoPath | string | Yes | - | Video output path |
videoConfig | 1 | 2 | 3 | 4 | No | 4 | Video configuration -- defaults to 1080 |
detectType | 1 | 2 | No | 1 | Recognition type |
imageEditType | 1 | 2 | 3 | No | 1 | Image processing type |
musicPath | string | Yes | - | Local path of background music |
audioEditType | 1 | 2 | 3 | No | 1 | Audio processing type |
originAudioVolume | number | No | 0.5 | Original audio volume |
overlayAudioVolume | number | No | 0.5 | Overlay audio volume |
complete | () => void | No | - | Completion callback (executed on both success and failure) |
success | (params: Object) => void | No | - | Callback on successful API call |
fail | (params: Object) => void | No | - | Failure callback |
success callback parameters
| Property | Type | Description |
|---|---|---|
path | string | Output path |
fail callback parameters
| Property | Type | Description |
|---|---|---|
errorMsg | string | Error message |
errorCode | string | number | Error code |
| Error extension |
Return Value
None
Valid Values
videoConfig
| Value | Description | AIKit Since |
|---|---|---|
1 | 480 | - |
2 | 540 | - |
3 | 720 | - |
4 | 1080 (default) | - |
detectType
| Value | Description | AIKit Since |
|---|---|---|
1 | Pets | - |
2 | People | - |
imageEditType
| Value | Description | AIKit Since |
|---|---|---|
1 | No effect | - |
2 | Emphasize subject | - |
3 | Privacy protection | v1.2.0 |
audioEditType
| Value | Description | AIKit Since |
|---|---|---|
1 | No processing | - |
2 | 0.5 0.5 mixing | - |
3 | Mute video | - |