[Ffmpeg-devel] v4l2 default device

Luca Abeni lucabe72
Thu Sep 21 12:08:07 CEST 2006


Hi Richard,

On Thu, 2006-09-21 at 10:22 +1000, Richard Khoury wrote:
> I'm working on a project that uses video capture through ffmpeg and
> it is an annoyance that each time I restart my computer I have to
> run a program (in my case xawtv) that registers a device with the
> v4l2 driver before any video frames appear.
I think everything you have to do is to load the proper driver module,
and to use some program to setup the video device (select the correct
input, norm, etc). You can use a simple command-line program like v4lctl
(or something similar) for this purpose.

> In my case I've adjusted the v4l2.c file to automatically select the
> first cameral type, but in order to make this a nice generic patch
> there should be more available to select whether it's a tuner or
> camera input as well as which index it's at.
I think this should not go in v4l2.c. In my opinion, the input selection
should be done by a separate program that you run before starting
ffmpeg. So, for what I am concerned I'd reject a similar patch.

> Also, it would be extrememly handy
> to be able to select the frame format flag from the application side,
> but there is no way to change it from INTERLACED without hardcoding a
> new value in.
I am ok with a patch that adds an "interlaced" field to
AVFormatParameters and uses it to select the V4L2_FIELD_INTERLACED flag
in v4l2_format. Or you can use AVFormatContext and AVOptions.


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





More information about the ffmpeg-devel mailing list