Assuming you are recording *.mpg, if the source is hd it is more complicated. The easiest way to remove the comercials is with the frontend. I have never got on with the auto removal options and find the manual method easy and exact. While watching a recording
this brings up the editor. Use the left and right arrows to find the start point you want to cut. You must select the nearest 'Keyframe' for the cut if transcoding (which you are). Use the up and down arrows to adjust the amount that time leaps with each press of the left and right arrows. When you find the start of the cut you want pressfind the end of the cut you want and press 'Enter' again. You will see the cut turn black in the timeline. When finished
Now you are ready to transcode. This is set up in the backend set up. I always use lossless myself so the exact settings you will want for xvid you will need to work out. My personal tip is not to bother changing the names of 'High, Medium and Low Quality' transcoder settings, just change the settings themselves. As when doing the next bit the frontend gui would not be updated with the new name. I don't know if this is still valid, I just never bothered to try and see if it has been fixed.
Save Cut List And Exit
Whilst watching the recording that you have added the cuts to
for example. Thats it, you can exit the recording now and some time later the system will finish the transcoding. Recordings are in /var/lib/mythtv/recordings. Good luck.