improoved keyframes subsampling