Default Mplayer installation autodetects Xvid, H264 and other codecs. So if you have Xvid and H264 codecs installed your mencoder and mplayer should support it, unless you disable them during compilation. In order to have your Mencoder and Mplayer support Xvid and H264 you need to install them first and then compile/re-compile Mencoder/Mplayer.
H264/x264 is a library for creating H.264 video. MPlayer sources are updated whenever an x264 API change occurs, so it is always suggested to use MPlayer from Subversion. At this time of post x264 in on development release only.
bzip2 -cd x264-snapshot-20090113-2245.tar.bz2 | tar xvf -
cd x264-snapshot-20090113-2245
Build and install
123
./configure
make
make install
Compile/Re-compile Mplayer:
You can use the latest release version of Mplayer for Xvid only but there are issues during build on x264, as it is not updated. It’s better to re-compile Mplayer from their SVN.