Web Cams and UN*X

I have a nice little environmentally-sealed Emerson camera ($30) that makes a spectacular web cam I’ve found.

Is there a library linkable (or otherwise) with GCC whereby I can capture its USB output and manipulate it programatically. I would also want to compress it to drive in MPEG or MP4 format on board my stock BBBW. Any idea on some command line bins that would do this easily and well?

Thanks in advance.