Skip to main content

add_stream

This method allows you to add a stream to EyesOnIt which you can then monitor. When a stream is added to EyesOnIt, it is ready to be monitored, but monitoring must be initiated manually with the monitor_stream method.

Method: POST

Endpoint: /add_stream

Body

{
"stream_url": "rtsp://192.168.1.54/live0",
"name": "Street Camera",
"regions": [
{
"top_left_x": 435,
"top_left_y": 388,
"width": 600,
"height": 224
}
],
"object_size": 210,
"prompts": [
{
"text": "vehicle",
"threshold": 95,
"background_prompt": false
},
{
"text": "driveway",
"background_prompt": true
}
],
"alerting": {
"alert_seconds_count": 0.4,
"reset_seconds_count": 2,
"image_notification": false,
"genetec": {
"webhook_event_id": 5000,
"webhook_camera_uuid": "00000001-0000-babe-0000-b8a22f754706"
}
"rest_url": "https://192.168.1.25:5000/alerts/handle_alert"
},
"efficient_detection": {
"periodic_check_enabled": true,
"motion_detection_enabled": true,
"motion_detection_threshold": 5000,
"motion_detection_seconds": 0.2,
"periodic_check_seconds": 5
},
"bounding_box": {
"bounding_box_enabled": true,
"detect_people": false,
"detect_vehicles": true,
"detect_bags": false,
"person_confidence_threshold": 30,
"vehicle_confidence_threshold": 30,
"bag_confidence_threshold": 30
},
"frame_rate": 5,
}

Body Attribute Descriptions

NameTypeDescription
stream_urlstringthe RTSP URL for the stream including credentials required to connect to the stream
namestringa friendly name for the stream used in the EyesOnIt Web UI and in alerts
regionsRegion[]an array of rectangle detection regions
object_sizenumberthe estimated object size in pixels
promptsPrompt[]an array of object descriptions describing objects to detect
alertingAlertingthe alerting settings for this stream
efficient_detectionEfficientDetectionthe motion detection settings for this stream
bounding_boxBoundingBoxthe common object detection settings for this stream
frame_ratenumberthe frame rate for this stream. This attribute is optional. The default value is 5.

Response

{
"message":"stream rtsp://Va8RLc91r2Am:Jg7SuwC9ea4u@192.168.1.54/live0 successfully added"
}

Response Attribute Descriptions

NameTypeDescription
messagestringthe success message