Direct Download api not returning video
CompletedHi,
I am trying to download videos from the server using the Direct Download api. For ex:
https://<username>:<password>@<server-ip>:7001/hls/<camera-id>.mkv?pos=1654675272000&duration=10
However very frequently I'm not getting the exported video, just a 0 bytes file. When I added retries, I noticed that sometimes it takes upto 10 minutes to export the video at the timestamp that I'm interested in. I've checked the media server, and the buffer being written seems to only lag by a minute or so.
The server resources (CPU and RAM) seem fine. Is there something I can do to fix this download issue? I'd like to be able to download the video at least within a minute or two.
My usecase is this: On Camera motion stop, download the video for that timestamp.
I have an event rule that is triggered on 'camera motion stop', which uses DoHttp action to call my api. Once my api is called, I download the camera's video (from 5 seconds before) for further analysis.
If there is a better way to get the videos that triggered the motion, please let me know. Any pointers are appreciated.
-
Hi Smita,
described behavior can occur when using /hls API for exporting video. We're aware of this issue and in version 4.2 we implemented a workaround.
Please use /media API for exporting video as it works much faster and wouldn't have this issue. Request for export should look like this:
https://<username>:<password>@<server-ip>:7001/media/<camera-id>.mkv?pos=1654675272000&duration=10
Please sign in to leave a comment.
Comments
1 comment