I'd like to take a picture with my webcam on the command line with VLC.
The camera is a Microsoft XBox Live Vision camera that I picked up on a whim (it was $5) and it miraculously worked out-of-the-box on Linux.
The thing is, the first frame every time the camera turns on is half purple static. The next few frames are poorly lit as the camera calibrates to its lighting (yes, the webcam itself calibrates the brightness, entirely independently of the computer.)
What I want is to open the webcam, stream for 1 second (or even a set number of frames would be fine), then save the last frame as a JPEG. It's not necessary to open a window.
What would it take to do this?