finished the video and picture code