replace the cutting logic with an ffmpeg command. should be far more accurate than anything i could write