Closed
Description
🚀 The feature
TorchCodec's public VideoDecoder
should have an approximate seek mode. Users should be able to specify they want the mode when they instantiate the decoder.
Motivation, pitch
The primary motivation is performance. Currently, TorchCodec always performs exact seeks. We accomplish the exact seeks by first scanning the entire video file, and building up our own frame-table internally. This means we're not susceptible to bad header metadata. But it adds an upfront linear cost to all decoding. This hurts performance for both large files, and when the decoding pattern is sequential from the start.
This is a high priority feature, as it should help to address some current performance issues users are seeing.