Alternitivly, you could pay to get a decent quality program known as "
Video Cleaner" by
River Past. Its $29.39US. (Course, if you know where to look, you can skip paying

). It will convert virtually any video format into another. They also have tutorials on their website showing you how to do it.
You will still need to demux the video (I suggest
Virtualdubmod, which is free).
How ever, doing anything to already compressed media (Be it audio or video), you will always suffer some loss in quality, since you are making a copy of a copy, which eventually degrades every time you do it.
My question to you is: Why convert it from h264? That format is generally known for being of superior quality.