Affected Roles: All user
Related Nx VMS Apps: Nx Server
The Nx Server API allows developers to pull the streams from Nx mediaserver in different codec via HTTP. In this guide, we'll show you how to use the API for anytime you want to utilize live or recorded video from a camera or cameras in your Nx Witness System.
In API documentation, one can find the section called HTTP streaming. The developers can use this API to retrieve any piece of archive stored or live video.
Codec and stream format can be specified in URL parameters. If required and possible, media stream transcoding is performed on-the-fly. Supported stream formats are webm, mpegts, and mpjpeg (motion jpeg).
The URL to request is:
Example of url:
- If there is no archive on the assigned time, Nx 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 camera id.
- Nx provides the API to let you know the existing archive of each camera.(identified by duration and start position):
- You can find full API document here (Login via demo/nxwitness)