There is a program called "Fraps" which records any OpenGL/DirectX games directly into high quality AVI files. It doesn't convert .dem to .avi, you have to watch the demo and record it.
http://www.fraps.comThe downloadable version records at half size and has a watermark, but you can buy the unlocked version, or apprehend it by other means. I would suggest buying it, because it is a very versatile program. I used to use it to record my CS matches back in the day when cheating was really bad, it worked really well.. it's a ton better now.
*edit* That BMP way is really a hassle, but much much easier to edit and add in things with photoshop and flash.. if you want to straight up record the demo, fraps is the way to go. There is also a program which converts any BMPs to JPEG as soon as it enters your screenshot directory in your HL folder (to save HD space). I forget what it's called, but it is useful beyond what words can describe.