Home

Jumat, 11 Juli 2008

Accessing webcam in your Laptop in Hardy June 23, 2008 — Rosario

Mplayer is a good movie player that supports almost all video and audio codecs. Mplayer can be used to view the output of the webcam also can be used to take the snaps using the web cam in your laptop.


The following is the command to view the output of the webcam

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

and to take the snaps (to capture each frame) as a picture use the following command.

$ mplayer tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0 -fps 30 -vo jpeg tv://

where fps specifies the frame rate in both cases. and this will determine the number of snaps taken per second.

This probably works with other destros also.. check it out….

To save the output as a vedio file you can use the mencoder command.

Also you can use XawTv package included by default in ubuntu for the above purpose.

 
©  Jurnalistik Lintas Warga Powered by Blogspot tutorial