Create a way to estimate DB export size in GB

https://developer.milestonesys.com/s/question/0D53X00008wXfYISA0/is-it-possible-to-estimate-the-exported-video-size-from-the-sdk

Searched the forum, found the above conversation. I think I was scratching my head at this issue a few years ago!

Here to do some more head scratching and seeking advice..

I can see a way to estimate an export in two ways. 1) Learn the database’s folder structure very very well and use that to estimate by using magic. 2) read the camera’s properties and estimate based on resolution, codec, fps, etc.(none of my customers record on motion)

Hi Richard,

Since the SDK doesn’t provide a method for learning how many recorded bytes are available between two timestamps, one way you might do this is to estimate based on the current bitrate of the recorded stream.

The RecorderStatusService2 api provides a GetVideoDeviceStatistics method, which will give you a collection of video stream statistics. Filter those for the items where “RecordingStream” is true, and then get the BPS property. With the bitrate, you can estimate the size of an hour of video or whatever the export duration is.

It’s not perfect since bitrate can vary significantly depending on time of day, image noise, activity, and use of “h26x+” features like dynamic GOP and compression, but hopefully it gets you in the ballpark.

If you’re not recording always, then there would be an added step of discovering all the recording sequences between the start/end time, adding up the timespans, and then multiplying the bitrate by the expected number of seconds of recordings available between the start/end time.

Is it possible to use the VideoOS.Platform to obtain this information?

@Josh Hendricks (Milestone Systems)​ reviewing this again. Is it possible to use VideoOS API to get the bitrate?

Thanks so much! This gives me confidence that we could add ‘by export size’ as a feature to our automated archiving software. Of course with the caveat that the quantities in GB may not be precise.