process_video
This method allows you to process a video file with EyesOnIt. EyesOnIt can optionally produce an annotated video as output. It can also notify other software of detections through calls to a REST URL.
Method: POST
Endpoint: /process_video
Body
{
"input_video_path_list": [
"/home/eyesonit_user/input/video/back_alley_vehicles.mp4"
],
"output_video_path": "/home/eyesonit_user/output/video/back_alley_vehicles_out.mp4",
"frame_rate": 15,
"start_seconds": 0,
"end_seconds": 30,
"real_time": false,
"output_all_frames": false,
"regions": [
{
"enabled": true,
"name": "Back Alley",
"polygon": [
{
"x": 528,
"y": 175
},
{
"x": 876,
"y": 166
},
{
"x": 896,
"y": 285
},
{
"x": 506,
"y": 279
},
{
"x": 528,
"y": 175
}
],
"motion_detection": {
"enabled": true,
"detection_threshold": 300,
"regular_check_frame_interval": 1,
"backup_check_frame_interval": null
},
"detection_configs": [
{
"class_name": "vehicle",
"class_threshold": 10,
"object_size": 150,
"object_descriptions": [
{
"text": "vehicle",
"threshold": 90,
"alert": true,
"background_prompt": false
},
{
"text": "street building",
"threshold": null,
"alert": false,
"background_prompt": true
}
],
"conditions": [
{
"type": "count_greater_than",
"count": 0,
"line_name": null,
"alert_direction": null
}
],
"alert_seconds": 5,
"reset_seconds": 60,
"vms_config": null
}
]
},
],
"lines": [],
"notification": {
"phone_number": null,
"image_notification": false,
"genetec": {
"webhook_event_id": null,
"webhook_camera_uuid": null
},
"rest_url": "http://localhost:5000/alerts/handleDetection"
},
"effects": {
"show_regions": false,
"show_lines": false,
"show_bounding_boxes": true,
"show_motion": false,
"show_confidence_levels": false,
"show_alert_text": true
}
}
Body Attribute Descriptions
Name | Type | Description |
---|---|---|
name | string | a friendly name for the video file used in detection output |
input_video_path_list | array of string file paths | an array of input file paths to process |
output_video_path | string file path | an output file path for the generated video. If this is null, EyesOnIt will not generate an output video. |
frame_rate | integer | the EyesOnIt processing frame rate. This is the number of frames to process, not the source video frame rate. This attribute is optional. The default value is 5. |
start_seconds | integer | the start time in seconds within the video in to start processing. EyesOnIt will not process frames before this time. If this value is null or 0, EyesOnIt will start processing with the first frame. |
end_seconds | integer | the end time in seconds within the video in to end processing. EyesOnIt will not process frames after this time. If this value is null, EyesOnIt will process to the end of the video. |
real_time | boolean | true to process one second of video in one second. false to process the video as fast as possible. The default is false. |
output_all_frames | boolean | true to write all input frames between start_seconds and end_seconds to the output file even if the input contains no motion. false to write all input frames between start_seconds and end_seconds to the output file. The default is false. |
regions | Region[] | an array of detection regions |
lines | Line[] | an array of boundary lines |
notification | Notification | the notification settings for this stream |
effects | Effects | the options for output video overlays |
Response
{
"success": true,
"message": "video /home/eyesonit_user/input/video/back_alley_vehicles.mp4 processing complete",
"data": null
}
Response Attribute Descriptions
Name | Type | Description |
---|---|---|
success | boolean | true if the operation was successful. false otherwise. |
message | string | a human readable message describing the operation result |
data | JSON | if the request is not successful, this field provides detailed JSON error information. |