waveform-el icon indicating copy to clipboard operation
waveform-el copied to clipboard

Caching facility

Open zaeph opened this issue 4 years ago • 0 comments

The time that ffmpeg takes to generate waveforms is ratioed by the length of the video and the processing capabilities of the system. As such it'd be good to only have the system generate those waveforms once for a given file and cache it. However, since we adapt the dimensions of the waveforms by window height & width, this is not practical.

Potential solution

Cache a precise-enough waveform, and resize it for windows demand. We should be able to keep enough information during the resize.

Extra thoughts

  • We can only apply this caching for files above a certain size/length.
  • If the resizing loses too much information, we have generate 3-4 images which would be within the ballpark of most desired window height & width, and use the closest image for resize.

zaeph avatar Dec 04 '21 10:12 zaeph