~couchNerd ~serialOutrager ~puts2In42 ~makesPigsFly

Fun With Webcam In Linux

· by Shantanu Goel · Read in about 1 min · (104 Words)
fun Linux mencoder mplayer stream video webcam

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.

mplayer -fps 15 tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0

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 :-) .

Comments