This script analyzes a BizHawk movie file for blank input frames at the end. Removing such frames (AKA "Spiking") should reduce movie length without changing the outcome. Run the script with the movie loaded. I have not tested this with subframe input. I don't expect it to work with analog controls.
Feel free to improve upon this.