Why not just download Circo's or CDBrown's sets? Much easier.
Anyway, there was a
long thread detailing my work on the creation of the MAME videos. What I did was modify the MAME source to take each frame and save it to a png image. Then I took CRCs of each image and determined when a sequence of frames matched. This usually indicates a loop in the attract mode. Next, I created a VirtualDub script which told VirtualDub what frames to code into the video, which codec to use, and what audio source to use. Lastly, I wrote a batch process so that all this would happen without user involvement. Creating a set of videos would take upwards of a week.
CDBrown extended my work my trimming the attract loop to a title screen and some demo footage.
I don't even keep a copy of the original videos around anymore, I just have the CDBrown videos.