WebRTC unable to use webcam on Linux at 60fps
Categories
(Core :: WebRTC, defect, P5)
Tracking
()
People
(Reporter: t.moll, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0
Steps to reproduce:
Test machine running Debian unstable with Logitech Streamcam attached.
-
Navigate to: https://webrtc.github.io/samples/src/content/peerconnection/constraints/
-
Set constraints of horizontal resolution to 1920 and vertical to 1080
-
Set FPS constraints between 31-60 inclusive.
-
Click Get media
Actual results:
An error dialogue box appeared with the message:
getUserMedia error: OverconstrainedError
PermissionDeniedError may mean invalid constraints
Expected results:
The webcam should have been used with the set framerate as the webcam supports 1080p at 60 fps.
Using the same constraints in chromium works correctly. FPS verified using v4l2-ctl to access camera data.
With FPS set to 30 or below firefox is able to access the camera correctly.
Comment 1•6 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 2•6 years ago
|
||
Thanks for the bug report. Yes, the maxFPS is hard-coded here: https://searchfox.org/mozilla-central/rev/46e3b1ce2cc120a188f6940b5c6eab6b24530e4f/media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc#244. The same code still exists in upstream libwebrtc.
Chromium doesn't use the video capture code in libwebrtc, so is not affected. Here is the Chromium code: https://source.chromium.org/chromium/chromium/src/+/master:media/capture/video/linux/video_capture_device_factory_linux.cc;l=290
We can probably do something similar and then upstream the changes to libwebrtc.
Comment 3•6 years ago
|
||
After spending some time looking at this this morning, I think for this constraint to be really useful, we'd want to change the API to return a vector of supported frame rates instead of just the maximum frame rate. Something like that would have to land upstream first and then be backported to Firefox.
Description
•