Home > Documentation, English, GNU/Linux, Techie, ubuntu > Adobe Flash and V4L2 webcams

Adobe Flash and V4L2 webcams

Many new videoconference systems nowadays are Flash-based. Of course, the main input for them is some sort of video device (e.g. a webcam).

Under Linux, the framework responsible for this is Video4Linux (V4L), of which version 2 (aka V4L2) is current. That means that most recent webcams drivers are supported only by V4L2.

Alas, some proprietary editors (of which Skype and Adobe with Flash) still only support V4L1. If you’ve got a webcam with V4L2-only driver, you’re out of luck.

Recently, Adobe announced, Flash’s support of V4L2 on Linux beginning with 10 Beta, but they got something wrong. On my Philips SPC 315NC as an example, it is detected (in Flash’s Settings), but does not work (not activated), while it works perfectly with other programs (of which Cheese). On my Logitech QuickCam Express, it is not even detected by Flash.

Some complicated solutions are available on the Net, some based on some Gstreamer loopback-conversion from V4L2 to V4L1. Example: http://www.jtolds.com/newsletter/2008/7/27/how-to-get-v4l2-devices-to-work-with-flash

Though, there is a simpler solution I just found out: V4L2 is shipped with a compatibility-layer library. On my Ubuntu, it is to be found in /usr/lib/libv4l/v4l1compat.so.

So, using the mechanism to force loading this library, you will get your V4L2 webcam supported by Flash in your browser.

Example with Firefox:

LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so firefox

And of course, probably any other software suffering the same kind of flaw.


  1. Paolo
    November 8, 2011 at 8:57 pm

    Thank you, I’ve been looking for a solution to this problem for at least a couple of years

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: