Home > Bash, Linux > Vedio Recording using webcam in any Linux Distro

Vedio Recording using webcam in any Linux Distro

October 14th, 2008

For vedio recording in linux, mplayer alone may not be enough, one additional package that comes with mplayer is needed. Its mencoder. To install mencoder in a debian based distro use the command

$sudo apt-get install mencoder

For other distros like redhat you can use relevant tools like YUM to install mencoder.

Then for vedio recording follow the commad below

Video Recording Without Sound

$ mencoder tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0 -nosound -ovc lavc -o filename.avi

Video recording With Sound

$ mencoder tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0:forceaudio:adevice=/dev/dsp -ovc lavc -oac mp3lame -lameopts cbr:br=64:mode=3 -o filename.avi

To change/increase the rate of frames captured use the fps option of the above command.

Use it like

-fps 24

Rock with you webcam….

Rosario Bash, Linux

  1. Sai Wolf
    Sai Wolf
    October 22nd, 2008 at 21:28 | #1

    I read the title and it said “In any Linux Distro”

    That’s a bit of a lie.

    You see, you say:

    “$sudo apt-get install mencoder”

    APT is used on Debian based distributions. Distros like Red Hat, SuSE, Gentoo, Slackware, etc won’t be able to use this command. Maybe you should just advise the package to be installed and link to its source for the unlucky folks that don’t have the option of installing the package automatically?

  2. October 28th, 2008 at 23:45 | #2

    Thanks a lot for correcting me..I do accept my mistake. I have corrected my above post as per your suggestion.

  1. No trackbacks yet.