Question: Which software to use to record a couple of hours of video out of a webcam on Mac OS X?

Answer: 
It sounds like your criteria is specific to stability and overall recording length. I would highly recommend testing out any software you find on Google, but I can tell you I have in the past used iMovie HD to record several hours of video from a built-in iSight without issue. Photobooth may work just as well—the time counter does in fact have a tens of hours place.
I use QuickTime Pro. 

In my experience Photobooth does not work well with non-iSight external webcams. It seems to cut the video short. iMovie won't recognize my Logitech external webcam. I also tried QuickTime [Broadcaster](http://www.apple.com/quicktime/extending/resources.html) and that seems to leave my audio and video out of sink.