How to Request Video from the DW Spectrum Media Server with API
-----------------------------------
Affected Roles: Administrator, Power Users
Related Digital Watchdog VMS Apps: DW Spectrum
Last Edit: April 14, 2025
-----------------------------------
Use API for HTTP Streaming
The DW Spectrum Server API allows developers to pull video streams from the DW Spectrum Media Server with different codecs using HTTP.
This article will outline how to use API to utilize live or recorded video from a camera in your DW Spectrum System.
**NOTE: You can find the section “HTTP Streaming” in the DW Spectrum API Documentation. Developers can use this API to retrieve any piece of archived stored or live video.
Related Articles
Requesting an HTTP Stream
When using API to retrieve live or archived video, the codec and stream format can be specified in URL parameters. When possible, media stream transcoding is performed on-the-fly. Supported stream formats are webm, mpegts, and mpjpeg (motion jpeg).
The URL to request is:
http://{serverIp}:{port}/media/{cameraId}.{format}?resolution={resolution}&pos={dateAndtime}&{sfd,rt,rotation}
Example:
http:// 100.32.247.140:7001/media/321360dd-7b01-f4b5-9372-16deb7ea1293.mpjpeg?resolution=240p&pos=2018-05-08T12:10:30:000&sfd&rt
Additional Notes
- If there is no archive on the assigned time, DW Spectrum will jump to the closet time which has archive can be provided.
- The option - rt, is to enable the real-time optimization.
It might skip some frames if the CPU on the server is not enough for real-time transcoding. - The option - sfd, is called Stand Frame Duration.
If the parameter is present, video speed is limited by real time.
For example - if you are pulling the MPJPEG, if sfd presented, the archive will be in real-time, if sfd does not present, it will look like fast forwarding. - Here's a link to guide to find the Camera Id:
- DW Spectrum provides the API to let you know the existing archive of each camera.(identified by duration and start position):
http://{serverIp}:{port}/ec2/recordedTimePeriods?cameraId={cameraId}
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