Rate-Distortion Based Video Compression