ZoneMinder / pyzm

Python API, Log, Event Server and Memory wrapper for ZoneMinder
GNU General Public License v2.0
32 stars 21 forks source link

Frame and score from api #52

Open mdonadel83 opened 2 weeks ago

mdonadel83 commented 2 weeks ago

Good evening, Is possible from the api , return the score of the frame of the event? I would like to while every frames of one event , and use DetectSequence only if the score of the frame are more than a number i want.

Thanks

connortechnology commented 2 weeks ago

Of course. For example the following request: /zm/api/frames/index/EventId:17559047.json returns an array of frames for event 17559047 that looks like: { "frames": [ { "Frame": { "Id": 1774640189, "EventId": 17559047, "FrameId": 1, "Type": "Normal", "TimeStamp": "2024-11-05 13:06:16", "Delta": "0.00", "Score": 0, "Data_json": null, "TimeStampSecs": 1730829976 } }, ] }

The Score field is included.

I don't think there is any code in zmes to actually grab the frame record but it should be straight forward.

mdonadel83 commented 2 weeks ago

Thanks! Before i did with query direct to mysql, i had good result , but i prefer do all from api!