Fun With Webcam In Linux

Did you know that instead of installing special software to view your webcam video, you can simply use mplayer for the same purpose, and with a lot of fine control. e.g. try running the following command with your webcam attached to your computer.

And you can use mencoder to capture and encode video from your webcam:

mencoder tv:// -tv driver=v4l2:width=60:height=40:fps=60:device=/dev/video0 -nosound -ovc lavc -lavcopts vcodec=mjpeg -o test.avi

Have fun playing with the huge number of options available. You could even cat the test.avi file into a folder of your web server and have instant streaming video :-) .

See also