Skip to main content

FindClip

Find clips that satisfy the specified constraints.

This command enables visual operations, using the operations parameter.

Clips can be requested by specifying "blobs": True, in which case they are returned as blobs in the array of blobs.

Parameters

Details

Only one of in_frame_number_range, in_time_offset_range or in_time_fraction_range is supported at a time. For finding a clip, one or both of start and stop may be defined.

Operations defined in operations will be performed on-the-fly and will not affect the original video stored in ApertureDB.

If only one ref parameter is used in the is_connected_to array, the resulting objects obtained after traversing the given connection can be associated with their source objects by specifying the parameter group_by_source as true. Similarly, if the video_ref parameter is used, the results can be grouped by the source video. The parameter is ignored if neither is_connected_to nor video_ref is used. It is set to false by default.

If in_..._range is specified, the clips returned must be fully within the boundaries indicated by the given parameters.

Examples

Finds clips based on scene names for given video, returning the duration of the clip:


[{
"FindVideo": {
"_ref": 1,
"constraints": {
"name": ["==", "The Shining"]
}
}
}, {
"FindClip": {
"video_ref": 1,
"constraints": {
"name": ["==", "Girls In Blue"]
},
"results": {
"all_properties": true
}
}
}]

Successful response:


[{
"FindVideo": {
"returned": 0,
"status": 0
}
}, {
"FindClip": {
"status": 0,
"returned": 1,
"entities": [{
"_range_type": 3,
"_range_start": 1283000000,
"_range_stop": 1330000000,
"_time_offset_range": {
"start": "21:23.0",
"stop": "22:10.0"
},
"name": "Girls In Blue",
"_uniqueid": "2.0.42"
}]
}
}]

Find multiple clips based on the time that they are within the video, return the name of matching clips ( assuming the clips have a property, name )


[{
"FindVideo": {
"_ref": 1,
"constraints": {
"name": ["==", "The Shining"]
}
}
}, {
"FindClip": {
"video_ref": 1,
"in_time_offset_range": {
"start": "28:00",
"stop": "36:00"
},
"results": {
"list": ["name"]
}
}
}]

Successful response:


[{
"FindVideo": {
"returned": 0,
"status": 0
}
}, {
"FindClip": {
"status": 0,
"returned": 1,
"entities": [{
"name": "Room 237"
}]
}
}]

Find multiple clips based on the time fraction that they are within the video, return the name of matching clips ( assuming the clips have a property, name ). This example gets all clips in the first 35% ( regardless of frame count ) of the video.


[{
"FindVideo": {
"_ref": 1,
"constraints": {
"name": ["==", "The Shining"]
}
}
}, {
"FindClip": {
"video_ref": 1,
"in_time_fraction_range": {
"start": 0,
"stop": 0.35
},
"results": {
"list": ["name"]
}
}
}]

Successful response:


[{
"FindVideo": {
"returned": 0,
"status": 0
}
}, {
"FindClip": {
"status": 0,
"returned": 2,
"entities": [{
"name": "Isolated Island"
}, {
"name": "The Lodge"
}]
}
}]