[Ffmpeg-devel] [PATCH] grabbing with V4L

Luca Abeni lucabe72
Wed Feb 15 14:34:31 CET 2006

Hi Flavio,

On Mon, 2006-02-13 at 15:35 -0200, Flavio Pimentel Duarte wrote:
> I've downloaded the cvs version, and ran with the following arguments:
> ./ffmpeg -an -vd /dev/video0 -s 320x240 output.mpg
> FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
>    configuration:
>    libavutil version: 49.0.0
>    libavcodec version: 51.4.0
>    libavformat version: 50.2.1
>    built on Feb 12 2006 14:14:53, gcc: 3.4.3 (Mandrakelinux 10.2 3.4.3-7mdk)
> ioctl(VIDIOC_QUERYCAP): Invalid argument
> Could not find video grab device
Thanks for the testing

> The main problem is the camera module was implemented using V4L API and 
> not V4L2 and that's why I think V4L support can not be just stopped.
So, I think linux developers (or video4linux developers at least) are
very confused. I've been pointed to this link
saying that video4linux will be removed in July 2006. But there still
are drivers that only implement video4linux (no v4l2)? What will happen
to those drivers in July 2006?

Anyway, point taken... v4l support in ffmpeg cannot be removed.

> The patch I've sent didn't create a single new line, it only moves some 
> image settings initialization to outside the if statement. It was also 
> not my idea, I borrowed from mplayer ;)
Yes, looking at the patch I agree that it should not create problems.
I'll test it tomorrow, just as a confirmation.

> PS: I also had to hack configure script to compile ffmpeg with v4l2 
> support. The configure test is:
> #include <linux/videodev.h>
> int dummy = V4L2_PIX_FMT_YUV420;
> error msg:
> /usr/include/linux/videodev2.h:381: error: field `timestamp' has 
> incomplete type
> I had to change to:
> #include <sys/time.h>
> #include <linux/videodev.h>
> int dummy = V4L2_PIX_FMT_YUV420;
Opss... Sorry about that. Anyway, I see that a fix has already been
committed in the CVS.

Copy this in your signature, if you think it is important:
                               N O    W A R ! ! !

 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 Solo 10 Euro per chiamare in tutto il mondo!! Scopri il vantaggio di Email Phone Card,        clicca subito
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2685&d=15-2

More information about the ffmpeg-devel mailing list