I believe you cannot covert dem files. You can always start the demo and record that demo using FRAPS.
this artile best explains the process
http://tf2wiki.net/wiki/Help:Recording_demos
it was made for tf2 but it works exactly the same for every source game.
Great info, adding on:
Startmovie <filename> [avi/raw] Starts recording movie frames, stored in your game folder (..SteamSteamApps<username>team fortress 2tf) as .tga files.
A recent feature to HL2 is the ability to record directly to AVI (PC version) by specifying avi as a paremeter. When this parameter is used a windows codec dialogue box will be shown for you to select the codec so it is best to set TF2 to windowed mode before doing this. Example: Startmovie mymovie avi will record a mymovie.avi to your game folder
I just pulled that from the link that Passerby posted. So yes, you can record to .avi directly from source games.
Go into the Console
Type in "startmovie [name]"
then "playdemo [name]"
It will then record the demo into .tga files.
After it has gone past the part you wanted to record,
type "endmovie" in the console.
Erm, no...
instead of typing in startmovie [name]
just type in startmovie [name] avi
and with that you dont have to convert anything, it records it and places it in your game folder in avi format