[gst-devel] video playback fast (record with v4l2src)

Ronald S. Bultje rbultje at ronald.bitfreak.net
Wed Sep 20 00:47:13 CEST 2006


Hi Edgar,

On Tue, 19 Sep 2006, Edgard Lima wrote:
> For v4l2 drivers we can know the framerate using  VIDIOC_G_PARM
> See how it works looking the function gst_v4l2src_get_fps (also copied
> bellow) at
> http://webcvs.freedesktop.org/gstreamer/gst-plugins-bad/sys/v4l2/v4l2src_calls.c?view=markup
>
> btw: I have two webcams here, just one those drivers implements
> VIDIOC_G_PARM

For some purposes, indeed, VIDIOC_G_PARM works fine. However, as you said
here, and as I know from practice, most webcams don't actually implement
this. This is because there is no decent way to _set_ the framerate using
this API. You have to understand that the get-methods are fine for TV
cards, where the FPS depends on the norm, but not for webcams, where the
FPS is a separate property and such a thing as norms don't exist.
Implementing it is thus practically worthless. The pwc driver implements
the same flag-field-hack that they use in v4l1 also (through a private
ioctl).

> Do you think those methods aren't enough? I mean, the v4l2 standard
> should be improved or v4l2 drivers shoould?

API, I'm afraid, as explained above.

> ....I'm afraid, does it mean we can't record A/V coming from rtp,
> v4l[12], (live)? I think we should think about more robust way to do
> that (would it be videoscale?).

Not into AVI, but fortunately, you won't do that anyway. For RTP and live
recording from v4l, you really want to think this whole system through.
If you don't understand the responsibilities of each gst element, the
drivers (API/implementations + issues/bugs) and such, I don't think you'll
be able to write a solution that works very well. If it just works for pwc
webcams when transcoding in ogg/rtp using some obscure gst-launch
commandline, that's really good already, but you're really not there yet,
you're just at the beginning.

Ronald




More information about the gstreamer-devel mailing list