Processing the video frames