Webcamera save 3 seconds clips to image sequences, anyone made one already?

Hi there, when I’ve searched before I’ve often stumbled across patches people have already built before which helps me put together a new patch taking bits and pieces, much like the help patches in vvvv.

So I was wondering, has anyone made anything similar to this or a small part of this that they wouldn’t mind sharing?

I’d like to save 3 seconds of the output of the webcam to images in a directory every time the user presses a record button.
And I’d like each of these 3 second clips to be saved under different names so I can load them when I want.

Thanks for anything you wouldn’t mind sharing.