Prepare frames before generating video file