If you use Handbrake (or anything that uses x264), on the Video tab for x264 preset, push the slider to "Slow" or something below. This will increase the encoding time, but it was make the quality at any given bitrate MUCH better. So it's a way to ensure you get a good rip of your source material.