We are interested in developing an integration with Milestone that can send a HTTP post request to a 3rd party server with alarm metadata (e.g. camera guid, timestamp) and ideally include a short video clip of the alarm event.
What is the best way to achieve this?
I’ve been looking at Tools samples → Event Tracer and it seems possible to subscribe to new events / alarms. How would we retrieve an alarm footage given the alarm id?
It is not possible to get the footage directly from the alarm. You will need to subscribe an alarm which is triggered by an event and get the alarm timestamp together with the related camera ids. And then, you will be able to get the footage from the cameras.
You should look into the AlarmViewer sample. It’s located under ComponentSamples folder.
About receiving the footage from the camera - it depends on what you need. If you want to get a single image or multiple images in a time interval - you should use VideoOS.Platform.Data.JPEGVideoSource or VideoOS.Platform.Data.BitmapVideoSource class.
If you want video file footage - you can do an export (MKV, AVI or XProtect format using VideoOS.Platform.Data.AVIExporter, VideoOS.Platform.Data.MKVExporter or VideoOS.Platform.Data.DBExporter).