cvisionai / tator

Video analytics web platform
https://tator.io
GNU Affero General Public License v3.0
98 stars 32 forks source link

Early seeks to video would benefit from retries on prefetch occuring earlier #1689

Closed bctcvai closed 1 month ago

bctcvai commented 1 month ago

Some videos have been observed where if the video player load initializes at frame 5000, earlier seeks near the beginning of the video timeout (e.g. frames 25-150). The effective workaround is to call tator_video.onDemandDownloadPrefetch(0) which reloads the play buffer at frame 0 and then covers the desired region of video.

This seems to only happen in shorter videos.

It might be worth while to "back off" from the desired position in units of 25 until the prefetch worked. Its possible other regions of other videos result in "seek deadzones" and this trick could back you out of those too. An even simpler fix may be to do Math.max(currentFrame-200,0)