frame number is only incremented if a frame is successfully added to the video.