[FFmpeg-devel] The v4l2 demuxer and the use of libv4l2

Paul B Mahol onemda at gmail.com
Sun Dec 30 13:02:02 CET 2012

On 12/30/12, Stephan Hilb <stephan at ecshi.net> wrote:
> Hello,
> some time ago I contributed the cpia decoder for use with the v4l2
> demuxer to get my old camera working.
> To my surprise I noticed just now that when ffmpeg is build with the
> "--enable-libv4l2" flag (and thereby using libv4l2 as an additional
> layer between ffmpeg and the kernel api) my camera doesn't work as
> expected and the cpia decoder isn't used (libv4l2 does the conversion
> instead).

Perhaps previous libv4l2 version did not have support for cpia?

> Now this leads me to the question why the libv4l2 userspace library is
> used anyways when there is an appropriate decoder available for the
> format (cpia in my case).
> Also afaict there seem to be very few v4l2 formats not already
> understood by ffmpeg. So is there any other benefit in using libv4l2
> with ffmpeg?
> I'd like to clean up things in the v4l2 demuxer and fix some small bugs
> with ffplay-ing directly from /dev/video0. But I'm not sure whether to
> do it inside the v4l2 demuxer or rather work on libv4l2.
> To me it seems like a bit of a maintenance burden to support both ways.

Well, if libv4l2 way is slower for certain format then ffmpeg should
be idealy perfered instead.

More information about the ffmpeg-devel mailing list