How to download recoded video using NX API?
AnsweredI want to download/extract recorded archived video using start and end timestamp. Is there any API that provides me to download recorded video? I have gone through `http://localhost:7001/ec2/recordedTimePeriods` api. It lists period for custom start timestamp data. But. it's always return durationMs -1 until I restart recording. My problem is quite simple. I just want to get video using requested start time and end time stamp. Is there any direct api or solution for this?
-
Hello Muhamed,
> I want to download/extract recorded archived video using start and end timestamp.
> Is there any API that provides me to download recorded video?Yes, there is. It's called video API. You can find the documentation in Web interface of the Server.
http://localhost:7001/static/api.xml#group_Video_API
For example, to get a RTSP stream starting from the specific timestamp try this
rtsp://<server_ip>:<port>/12AB42FD5912?pos=1235631&resolution=240pos: By default, the server opens a camera at the live position. This parameter defines position in an archive (as a string containing time in milliseconds since epoch, or a local time formatted like "YYYY-MM-DDTHH:mm:ss.zzz" - the format is auto-detected). Position can be passed via standard RTSP attribute as well as via URL parameter
The most suitable for your task would be HTTP streaming.
http://<server_ip>:<port>/media/12AB42FD5912.webm
It has pos and endPos parameters.
1 -
Thanks for the response. Just for the confirmation, http://:/media/12AB42FD5912.webm this won't work when recording is disabled is it?
0 -
http://:/media/12AB42FD5912.webm WILL work even when recording is disabled on a camera.
However, if there are no recordings in the video archive for the time indicated by pos the API won't return a video, just because there is no video in the archive for that moment of time.
0 -
One more thing.
The recommended format is mp4. Like this
http://:/media/12AB42FD5912.mp4
In this case there is no transcoding and mp4 is more likely compatible.
0
Please sign in to leave a comment.
Comments
4 comments