
API Tip: Video Footage Export
-----------------------------------
Related DW Software: DW Spectrum Professional
Software Version: Version 5.0 and newer
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://:/hls/.mkv?pos=&duration=**NOTE: To learn more about using API to acquire a Camera ID, check out DW Spectrum - Finding a Camera ID with API.
Example of URL:
http://demo.dwspectrum.com:7001/hls/5bafc0e9-56be-97f8-5034-45a50cecf3d8.mkv?pos="2017-07-13T00:00:00"&duration=100
**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).
http://demo.dwspectrum.com:7001/hls/5bafc0e9-56be-97f8-5034-45a50cecf3d8.mkv?pos=1499904000000&duration=100
Additional Information
One can get list of all existing archive pieces for certain camera with request(identified by duration and start position):
http://:/ec2/recordedTimePeriods?cameraId=
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: https://www.digital-watchdog.com/contact-tech-support/
DW Sales: sales@digital-watchdog.com | www.digital-watchdog.com
Rev: 06/25 Copyright © DW. All rights reserved. Specifications and pricing subject to change without notice.