ArdenButterfield / stammer

Recreate any audio track by rearranging the frames of another video
MIT License
442 stars 31 forks source link

Only write needed video frames #56

Open Firepal opened 1 year ago

Firepal commented 1 year ago

This is a proposal from @mayhair in #11:

I also believe that once the frames needed to build the video are chosen, the useless ones can be immediately deleted before the build starts.

This is kind of the idea behind the new "mem_decay" mode, but it could also work for the default "write frames to disk" mode.

I would implement this as a list of ranges generated from the best matches. We sort the best matches, then create range() objects, then call ffmpeg for each range of frames we need generated.