Convert Video to h.264/mkv
This article shows how to use VLC to convert video to mkv format
Videolan VLC 2.0.0 is a handy tool for converting video. You can either directly use the GUI: convert/save, or put a command in a batch file for Win XP - the command below will convert any mkv video file to the h.264 codec with mpeg4 audio (use an option like --stop-time=30 to only encode the first 30 seconds):

for %%a in (*.mkv) do "D:\Apps\VLC\vlc" -I dummy -vvv "%%a" --sout=#transcode{vcodec=h264,vb=2000,acodec=mp4a,ab=192,channels=2}:standard{access=file,mux=mkv,dst="%%a".h264.mkv} vlc://quit

If you need to deinterlace the video then use this:

for %%a in (*.mkv) do "D:\Apps\VLC\vlc" -I dummy -vvv "%%a" --sout=#transcode{vcodec=h264,vb=2000,acodec=mp4a,ab=192,channels=2,deinterlace}:standard{access=file,mux=mkv,dst="%%a".h264.mkv} vlc://quit

Note that at the time of writing, VLC 2.0.1 had problems with its encoder.

Media Lab Overview
LIACS Homepage
MM Conf
ACM Multimedia
Science Direct
IEEE Library
LIACS Publications
ACM Digital Library