Is the Nx Cloud up? Visit our Status Page for the current health and performance of the Nx Cloud.

Status Page

NX API runs out of available video, no way to trigger cameras to release more

Answered

Comments

1 comment

  • Ichiro
    • Network Optix team

    * if I call `recordedTimePeriods` API call, I will get a list of responses and *some* of them will have a duration of -1 - which represents that the video time period be listed is *currently recording* (this is what I am currently observing) - in your example, this was 1724659293605

    yes, this is correct.
     

    * if I then take the current date/time and convert that to Ms unix time ie: 1724726777082 and subtract from timestamp startTimeMs that was reported, I should get a valid duration I can pass to the API. Using the example values above, I would subtract my value 1724726777082 from API response 1724659293605 which equals 67483477

    Yes, this is correct.
     

    * I could then call `/hls/{camera_id}.mkv?pos=1724659293405&duration=67483477` and the system would send me that time period?

    Yes, you can call this API and it gives you the video file.(Download)
    Also, the API format is `/hls/{camera_id}.mkv?pos=1724659293405&duration=67484 
    The duration is in second. You can check the document here.
    https://meta.nxvms.com/doc/developers/api-tool/hls-deviceidformat-get
     

     

    * Would the list of available time periods `recordedTimePeriods` return new time periods of startTimeMs=1724659293405 duration=67483477 and startTimeMs=1724726777082 duration=-1 ???

    No, It goes  startTimeMs=1724659293405 duration=-1 still. 
    The API return is simply provide the "period" available on the server, and there might be no need for redundant indicators, since it is continous, and no "individual periods."
    If you have 4 different objects, meaning you have 4 independent period of recording, showing by (start time and duration).
     
    The idea is simple, the API returns the recording period same as you saw on the timeline.
    Ex: You can see three different periods on the timeline, you would see three objects in "periods".

     
    If the recording has no gaps(meaning all in continuous) , for example the following sample, then you would have only one period, which start from X and duration = -1, i.e still in recording.

     

    0

Please sign in to leave a comment.