Keyframe storing and retrieval