Hi and welcome to the forum
There are many codecs that allow you to reduce file dimensions with still good quality.
One of these is divx (not free); another is xvid (free). For what I know, realmedia is not the best codec available. mpeg have a good quality, but a lesser compression than divx or xvid