Find the nearest keyframes to split videos efficiently