Skip to main content

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

NameTypeDescription
namestringa friendly name for the video file used in detection output
input_video_path_listarray of string file pathsan array of input file paths to process
output_video_pathstring file pathan output file path for the generated video. If this is null, EyesOnIt will not generate an output video.
frame_rateintegerthe 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_secondsintegerthe 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_secondsintegerthe 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_timebooleantrue to process one second of video in one second. false to process the video as fast as possible. The default is false.
output_all_framesbooleantrue 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.
regionsRegion[]an array of detection regions
linesLine[]an array of boundary lines
notificationNotificationthe notification settings for this stream
effectsEffectsthe 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

NameTypeDescription
successbooleantrue if the operation was successful. false otherwise.
messagestringa human readable message describing the operation result
dataJSONif the request is not successful, this field provides detailed JSON error information.