vitrivr / vitrivr-engine

vitrivr's next-generation retrieval engine. It is capable of extracting and retrieving a wider range of multimedia objects such as audio, video, images or 3d models.
https://vitrivr.org
MIT License
6 stars 3 forks source link

Error in `Resetting to invalid mark` in `VideoDecoder` unsing `InputStream` #72

Closed net-cscience-raphael closed 4 months ago

net-cscience-raphael commented 6 months ago

The error occurs when loading huge video files (>2GB) with InputStream in class VideoDecoder .

As a stopgap solution, InputStream is replaced with File

image

ppanopticon commented 6 months ago

Working with File is not feasible. We have use-cases, where there simply is no file since the data comes from some remote source.

However, as a fix, the VideoDecoder now makes a distinction between FileSource and any other type of Source.

/* Decode video and audio; make distinction between FileSource and other types of sources. */
if (source is FileSource) {
    FFmpegFrameGrabber(source.path.toFile()).use { grabber ->
        decodeFromGrabber(source, sourceRetrievable, grabber, channel)
    }
} else {
    source.newInputStream().use { input ->
        FFmpegFrameGrabber(input).use { grabber ->
            decodeFromGrabber(source, sourceRetrievable, grabber, channel)
        }
    }
}

This should address your issue. However, could you please provide me with the vide that caused the issue (e.g., Switch file sender). I might have a look.

ppanopticon commented 5 months ago

@net-cscience-raphael Could you please provide me with an example video that triggers this error?

net-cscience-raphael commented 4 months ago

https://filesender.switch.ch/filesender2/?s=download&token=c0c10160-3259-41df-8290-593cdd556693