History | Log In     View a printable version of the current page.  
Issue Details (XML)

Key: FP-204
Type: Feature Request Feature Request
Status: Open Open
Priority: None None
Assignee: Justin Everett-Church
Reporter: Steve Castellotti
Votes: 15
Watchers: 9
Operations

If you were logged in you would be able to see more operations.
Flash Player

Video4Linux2 Support for Linux

Created: 05/09/08 04:24 AM   Updated: 05/21/09 03:58 PM
Component/s: Video Camera
Security Level: Public (All JIRA Users )

Internal Priority:


 Description  « Hide
The current version of Adobe Flash Player support the Video4Linux API version 1 for input from video devices such as webcams, tv tuners, and capture devices. All current and future devices no longer support this API, and drivers are only under active development for Video4Linux API version 2. Therefore as time goes on fewer and fewer Linux users will be able to utilize the Video Camera feature unless Video4Linux2 (V4L2) support is added to the Flash Player for Linux.

 All   Comments      Sort Order:
Steve Castellotti - [05/09/08 04:25 AM ]
A temporary workaround for Linux users is available here:

http://www.swift-tools.net/Flashcam/


Note that this video loopback based workaround requires significant CPU overhead during emulation.


tom zerucha - [05/13/08 01:41 PM ]
This is technically a duplicate of FP-137.

I managed to adapt a version of the above tool for my Nokia tablets which uses little CPU (<10%, probably <5%), not much memory, and is all but transparent.

However Flash itself is doubly broken - normally it will attempt to open the first /dev/videoX device, which will be the wrong one and most sites don't present a camera selector. This behavior is copied by other applications, so shuffling the minor device numbers and the video numeric suffixes breaks one or the other as they are all V4L version 2.

The conflict can be solved it by changing the text string within the flash plugin from "/dev/video" to "/dev/v4lv1" or something similar, but apparently the EULA says fixing it in this way is forbidden. (Otherwise, is there someone at Adobe who could grant me and/or other developers permission to make this one specific change to the binary image?).

tom zerucha - [05/13/08 01:59 PM ]
To clarify, the above program (flashcam) used a modified version of the video loopback kernel module to proxy V4Lv2 to V4Lv1, creating a video sink at /dev/videoX and video source (which is V4Lv1 compatible!) at /dev/video(X+1) (it can do multiple pipes). It then launches a program to continuously read from one device and write to the video sink, so flash can read from the V4Lv1 video source. The video sink will block if the video source is not being read, so it is designed to not consume CPU.

Note I had to modify the video loopback further to make it block properly, but have verified with the patches on the Nokia tablets it works correctly.

I did some further modifications to make a Nokia specific version of flashcam that was extremely efficient and would not open the camera device until Flash started reading and close it when it stopped so it would be completely transparent when not used (zero cpu, /dev/video0 works normally, etc.). This would work for ordinary Linux, but some further adaptation would be needed for various acquisition methods, multiple cameras, resolutions, etc. if you wanted everything to work transparently.

The problem remains that the plugin wants to open /dev/video or /dev/video0 by default. So either the LD_PRELOAD shim is needed or the binary needs to be patched to point to a V4Lv1 device node, or some other mechanism.

tom zerucha - [05/16/08 07:12 AM ]
I stand corrected - the default comes from the Flash Settings... which can normally be set in the dialog, but if flash attempts to open a V4L2 device, it crashes, so there is no effective way to set the default to the V4L1 device without something to prevent the V4L2 devices from being visible.

Markus - [05/21/09 03:58 PM ]
I would rather call this a bug than a feature request because it practicly completely
breaks web cam support for newer hardware on Linux.
Rather than arguing about dirty workarounds (which i could not convince to work on my x86-64 ubuntu)
you should natively provide V4L2 support ASAP!