Viewing a V4L2 webcam with mplayer

The great mplayer can be used to view movies, play dvd's, and even to watch the webcam. For my Logitech QuickCam Pro 4000, I use the following command:
mplayer -cache 128 -tv driver=v4l2:width=640:height=480:outfmt=i420 -vc rawi420 -vo xv tv://

If you have multiple v4l2 devices, you can choose which device you want to use by adding 'device=/dev/videoX' to the options:
mplayer -cache 128 -tv driver=v4l:width=640:height=480:outfmt=i420:device=/dev/video1 -vc rawi420 -vo xv tv://

© GeekLabInfo Viewing a V4L2 webcam with mplayer is a post from GeekLab.info. You are free to copy materials from GeekLab.info, but you are required to link back to http://www.geeklab.info
1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 2,50 out of 5)
Loading...

1 thought on “Viewing a V4L2 webcam with mplayer

  1. chris gregory

    In the second command line you put v4l instead of v4l2
    also, don't need to force video codec (can just leave out the -vc option) because you're watching it live! right? anyway works for me.
    the width and height options seem to be ignored, that may be that my webcam feed and /dev/video0 only support 320x240. have higher resolution on the dv feed from the same device. darn all this newfangled technology!

Geef een reactie

Het e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *

*

code