Home > Ubuntu > Accessing webcam in your Laptop in Hardy

Accessing webcam in your Laptop in Hardy

June 23rd, 2008

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.

Do write ur comments….

Ubuntu ,

  1. JuanPablo
    October 12th, 2008 at 10:23 | #1

    and … how record video ???

    tks.

  2. October 14th, 2008 at 17:24 | #2

    Thanks for your Comment..
    To record a video , check out my recent posting

    http://linuxmonk.wordpress.com/2008/10/14/vedio-recording-using-webcam-in-any-linux-distro/

  1. No trackbacks yet.