Added additional checks so no generated keyframe is closer than the proximity limit to the first and last frames of the clip