Package: firefox-esr
Version: 140.12.0esr-1~deb13u1
I am using Firefox with Wayland+PipeWire on Trixie together with a v4l2loopback
virtual camera.
The virtual camera is generated from an older Logitech QuickCam Express/Go
(lsusb says vendor is 046d and product is 092f):
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libv4l/v4l2convert.so ffmpeg -f v4l2
-framerate 9 -video_size 352x288 -i /dev/video0 -vf format=yuv420p,fps=30 -c:v
rawvideo -pix_fmt yuv420p -f v4l2 /dev/video10
The resulting loopback device advertises:
Pixel format: YU12
Resolution: 352x288
Frame rate: 30 fps
The virtual camera itself appears to work correctly:
- ffplay -f v4l2 /dev/video10 displays live video.
- Chromium can use the virtual camera on both
https://webrtc.github.io/samples/src/content/getusermedia/resolution and
https://webcamtests.com.
- Firefox successfully uses the virtual camera on https://webcamtests.com/.
- Firefox can enumerate the virtual camera and open it via
navigator.mediaDevices.getUserMedia().
For example, after granting camera permission:
await navigator.mediaDevices.getUserMedia({
video: {
deviceId: { exact: vcam.deviceId },
width: { exact: 352 },
height: { exact: 288 }
}
});
succeeds.
Likewise:
width: { ideal: 320 }
height: { ideal: 240 }
also succeeds.
As expected,
width: { exact: 320 }
height: { exact: 240 }
fails with
OverconstrainedError
because the camera only advertises 352x288.
However, on https://webrtc.github.io/samples/src/content/getusermedia/resolution,
selecting the virtual camera and clicking "QVGA" produces
getUserMedia constraints:
{"video":{"width":{"exact":320},"height":{"exact":240}}}
followed by
AbortError
Starting videoinput failed
instead of the OverconstrainedError observed when issuing the equivalent
getUserMedia() call directly from the Firefox console.
This suggests either:
- Firefox behaves differently during the request sequence used by the sample
than during a direct getUserMedia() call, or
- there is an interaction between Firefox and the sample that results in
AbortError instead of the expected OverconstrainedError.
Since Firefox successfully streams from the same virtual camera on
webcamtests.com and through direct JavaScript calls, the virtual camera itself
does not appear to be the cause.
Steps to reproduce:
1. Create a v4l2loopback device exposing only 352x288 YU12.
2. Feed it using the FFmpeg command above.
3. Open https://webrtc.github.io/samples/src/content/getusermedia/resolution/
4. Select the virtual camera.
5. Click “QVGA”.
Expected result:
The browser either reports OverconstrainedError for the unsupported 320x240
exact constraint or otherwise behaves consistently with direct getUserMedia()
calls.
Actual result:
AbortError:
"Starting videoinput failed"
If this is not considered a Debian-specific issue, please forward it upstream
to Mozilla (or, if appropriate, to the webrtc/samples project).