How to fetch a video clip of a given duration through Milestone protocol integration?

We have a use-case where we would like to scrape recorded video of a given duration which could be up to 5 mins from a camera through Milestone. What is the API and Service that can be used to retrieve this?

Image Server protocol. You would fetch video until you have 5 minutes of video, there is no single request for fetching a period, you would instead get one image or GOP and ask for the next.

https://doc.developer.milestonesys.com/html/index.html?base=reference/protocols/imageserver_request_response.html&tree=tree_3.html

Alternatively you can use the Mobile Server and either request pictures or request an export covering the period.

https://doc.developer.milestonesys.com/mipsdkmobile/

I see, thanks. Do you recommend using the Image Server protocol approach or using Component Integration with the MultiMedia Toolkit to export video clips? Or using the Mobile Server?

When you call it export I would disregard the Image Server protocol because you would need to work with raw data and create the export package from that. If you have a background with expertise fitting it might not sound bad but I suspect even then it is a time consuming development task.

If you use the Component integration you have an easy job, there is even a sample. https://doc.developer.milestonesys.com/html/index.html?base=samples/pluginsamples/scexport/readme.html&tree=tree_1.html

Using the Mobile SDK can be an advantage as the mobile server is optimal for exposing functionality externally through web or similar. https://doc.developer.milestonesys.com/mipsdkmobile/