mencoder & webcam

From: Andrea Frigo (etilic_knight_at_vodafone.it)
Date: 08/31/04


Date: Tue, 31 Aug 2004 13:08:37 GMT

Hello. I'd like to record mpeg or divx movies with my webcam trought
mencoder. I know mencoder can manage tv-like devices. I have a logitech
quickcam express and I use
http://www.ee.oulu.fi/~tuukkat/quickcam/quickcam.html this driver.
I have been trying to see webcam output with mplayer before to try and
make a video with mencoder.
When I gave this command

mplayer tv:// -tv driver=v4l:width=352:height=288

I got this reply from mplayer

Playing tv://.
TV detected! ;-)
Selected driver: v4l
  name: Video 4 Linux input
  author: Alex Beregszaszi
  comment: under development
Selected device: Logitech QuickCam USB
  Capabilites: capture subcapture
  Device type: 513
  Supported sizes: 32x32 => 352x292
  Inputs: 1
   0: Camera: (tuner:0, norm:pal)
Using input 'Camera'
Selected input hasn't got a tuner!
ioctl set picture failed: Invalid argument

Exiting... (End of file)

when I tryed this other command

mplayer tv:// -tv driver=v4l2:width=352:height=288

I got this answer
Playing tv://.
TV detected! ;-)
Selected driver: v4l2
  name: Video 4 Linux 2 input
  author: Martin Olschewski <olschewski@zpr.uni-koeln.de>
  comment: first try, more to come ;-)
v4l2: ioctl query capabilities failed: Unknown error 515
v4l2: 0 frames successfully processed, 0 frames dropped.

Exiting... (End of file)

I then tryed to make a fifo file with mkfifo and save an uncompressed
avi to it with xawtv, then opening the fifo with mencoder and it worked.

mencoder -oac copy -ovc lavc -lavcopts vcodec=mpeg1video:vbitrate=100 -o
video.mpg fifo

but this is a complex and resources wasting way to get result.

I tryed rawvideo option in mplayer too, but it doesn't work fine.

mplayer -rawvideo w=352:h=288:on:fps=15 /dev/video0

Do you think it is a webcam driver problem or a mencoder problem? I
think the right way to proceed is the first try I done...

PS
sorry about my english. I am italian.



Relevant Pages