Comment #25 on issue 470717 by
attito...@gmail.com: webcam not working
https://code.google.com/p/chromium/issues/detail?id=470717
I have the same problem with an old Trust webcam. By default it's not
recognized by Google Chrome. If I start the browser
LD_PRELOAD=/path/to/v4l2convert.so (this lib basically converts exotic
pixel formats like P207 to commonly used ones like RGB24), the webcam is
recognized but I get no image.
---
I did some tests with Google Chrome, Chromium and other software on
different OSs and architectures:
PCs and OSs used:
- Desktop PC 1 - Linux Mint 17.3 Cinnamon (x64)
- Desktop PC 2 - Ubuntu 15.10 (x64)
- Asus K55VM notebook (with built in webcam) - Ubuntu 15.10 (x64),
- Asus Eee PC 1015P netbook (with build in webcam) - Linux Mint 17.3
Cinnamon (i386)
Web cameras tested:
- Trust WB-1400T (
http://www.trust.com/en/product/14382-webcam-wb-1400t)
- Asus K55VM built in webcam
- Asus Eee PC 1015P built in webcam
Web pages used for testing:
https://alexandre.alapetite.fr/doc-alex/html5-webcam/index.en.html
https://opentokrtc.com/
Browsers: (64bit versions on first 3 PCs, and 32bit versions on EeePC)
- Google Chrome 48.0.2564.82
- Chromium 47.0.2526.106
- Firefox 43.0.4
Results:
- in any of the browsers started without LD_PRELOAD, the build in cameras
are working, but the Trust webcam is not recognized (because of the
proprietary pixel format P207)
- if I start Google Chrome or Chromium (except the 32bit Chromium) with
LD_PRELOAD=/path/to/v4l2convert.so, both the build in and the Trust webcams
are recognized, but none of them works - actually seems that the site gets
access to the webcam, but then the image is immediately gone (see the
attached image and the JS code in the source of the site)
-- with the 32bit Chromium on the EeePC both the built in and the Trust
webcam works, but the 32bit Google Chrome produces the above behaviour too.
- Firefox works as expected both with and without
LD_PRELOAD=/path/to/v4l2convert.so (the Trust webcam works only if Firefox
is started with the v4l2convert library)
- note: each start was a clean start, I killed any browser processes before
the start commands
If pretty clear that the problem is in Google Chrome and has something to
do with the v4l2convert.so library. As the v4l2covert.so does it's job with
almost any other program (I tried Firefox, fswebcam, Cheese, Skype, VLC,
etc), I think we can assume that something goes wrong in Google Chrome.
I attached some fswebcam logs started with and without
LD_PRELOAD=/path/to/v4l2convert.so. The with and without logs are pretty
the same, except that v4l2convert adds READWRITE to the capabilities, and
adjusts the list available pixel formats (exotics are removed, and common
ones are added).
I looked in the source code of Chromium here, but found nothing that could
cause this issue:
https://chromium.googlesource.com/chromium/src/media/+/85162da92a65a25b006a3fdbadba2dd40ba317a7/capture/video/linux.
Maybe the problem is somewhere in the access management to the webcam.
Hope this is enough information to locate an fix this issue...
Attachments:
v4l2convert-bug.png 49.2 KB
fswebcam-asus-eeepc.txt 1.4 KB
fswebcam-asus-eeepc-v4l2convert.txt 1.7 KB
fswebcam-asus-k55vm.txt 1.5 KB
fswebcam-asus-k55vm-v4l2convert.txt 1.8 KB
fswebcam-trust.txt 1.0 KB
fswebcam-trust-v4l2convert.txt 1.6 KB