API Tip: Video Footage Export
-----------------------------------
Related Digital Watchdog VMS Apps: DW Spectrum IPVMS
Software Version: v5 and higher
Last Edit: August 21, 2024
-----------------------------------
Using API to Export Video Footage
DW Spectrum Media Server allows users to export video using HTTP-GET methods. In API documentation one can find section called "Direct download" which describes a way to download certain piece of the archive.
**Note: The archive piece must exist. I.e. if there's no recording for that time you won't get anything.
Fragment of a camera archive to download is identified by camera id, its start time position and duration. Fragment can be downloaded in mpeg-2/ts (.ts) or Matroska (.mkv) format. No transcoding is performed.
The url to request is:
http://<server_ip>:<port>/hls/<camera_id>.mkv?pos=<YYYY-MM-DDTHH:MM:SS>&duration=<seconds>
**Note: This KB article link provides information for finding the camera ID
Example of url:
**Note: Fragment piece date and time should be specified according to Media Server Local Time.
The "pos" parameter can also take a string containing time in milliseconds since epoch(Unix time).
Additional Information
One can get list of all existing archive pieces for certain camera with request(identified by duration and start position):
http://<server_ip>:<port>/ec2/recordedTimePeriods?cameraId=<camera_id>
Example:
http://127.0.0.1:7001/hls/69faed90-dca3-1c08-8d70-26dbeb540dc4.mkv?pos=1724251200000&duration=10&hi=true
For More Information or Technical Support
DW Technical Support: 866.446.3595 (option 4)
https://www.digital-watchdog.com/contact-tech-support/
______________________________________________________________________________
DW Sales: 866.446.3595 [email protected] www.digital-watchdog.com