openshot-qt icon indicating copy to clipboard operation
openshot-qt copied to clipboard

Feature request: reuse already-made buffer chunks when moving the playhead cursor less than buffer length away

Open neube3 opened this issue 1 year ago • 1 comments

Describe the new feature: Buffer chunks are not reused. Say we have a video which I will conveniently partition into 26 chunks, each having 10 seconds (24 fps). Chunk A is frames 1-240 , chunk B is 241-481. Buffer length (that is, its size in RAM) is set to 3 chunks. When placing the playhead at boundaries between chunks J and K, we get a buffer of 3 full chunks: KLM.

Without changing ANYTHING in the video, when I move the playhead a single frame to the left, into the last frame of J chunk, the whole buffer gets tossed into trash and is recreated (painfully slowly). This seems wasteful.

Describe the solution you'd like: Before discarding any part of the buffer, check if it can be reused. In this example case, whole K and L chunks could be reused and all but the last frame of M chunk can be as well.

In my real use-cases (frame perfect cuts) most of the time usually 98% of the buffer could be reused.

Bonus points for pre-emptive extension of the buffer a second or so to the left of the playhead (so there is no furious re-buffering even for moving a couple of single frames to the left of the playhead).

This would also help with preview seeking times.

Describe alternatives you have considered: There is no good alternative, since buffer mechanism works to the right of the playhead and we assume users set up the RAM usage for as high as they can without negatively impacting their computers.

neube3 avatar Jan 01 '24 20:01 neube3

Assigned to lead developer.

Colorjet3 avatar Jan 02 '24 01:01 Colorjet3