Open Bug 1789112 Opened 4 years ago Updated 1 year ago

MJPEG webcam not supported on Linux

Categories

(Core :: WebRTC: Audio/Video, defect)

Firefox 106
x86_64
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: nazar, Unassigned)

Details

(Whiteboard: QA-not-reproducible)

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0

Steps to reproduce:

  1. Have 4k-capable webcam like Logitech BRIO
  2. Open any web page that can test video resolution or put together a simple page with getUserMedia, some examples: https://webcamtests.com/ https://testwebcams.com/webcam-resolution
  3. Check what resolutions are supported/try to use 4k resolution (3840X2160 or 4096×2160)

Actual results:

Usage of 4k resolution fails with OverconstrainedError

Expected results:

Should succeed like it does in Chromium

OS: Unspecified → Linux
Hardware: Unspecified → x86_64

Firefox only seems to be able to handle YUYV stream, not MJPEG, even though https://bugzilla.mozilla.org/show_bug.cgi?id=1151628 was closed. Did it regress or never worked on Linux?

The Bugbug bot thinks this bug should belong to the 'Core::WebRTC: Audio/Video' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → WebRTC: Audio/Video
Product: Firefox → Core
Component: WebRTC: Audio/Video → Audio/Video

I don't think this is Audio/Video, this is clearly something about handling WebRTC input devices.

Component: Audio/Video → WebRTC: Audio/Video

The severity field is not set for this bug.
:jib, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jib)
Severity: -- → S3
Flags: needinfo?(jib)

Hello! Thank you for submitting this issue unfortunately I don't have the necessary hardware to test this issue and will add the QA-not-reproducible tag. Could you please answer the following questions in order to further investigate this issue?

  1. Does this issue happen with a new profile? Here is a link on how to create one: https://support.mozilla.org/en-US/kb/profile-manager-create-remove-switch-firefox-profiles
  2. Does this issue happen in the latest nightly? Here is a link from where you can download it: https://www.mozilla.org/en-US/firefox/channel/desktop/
  3. Do you have any addons installed if so can you list them?
Flags: needinfo?(nazar)
Whiteboard: QA-not-reproducible
  1. Yes
  2. I only use Nightly, this was originally reported from Nightly (as can be guessed from date and version of the browser) and I just re-tested it in 107.0a1 2022-10-11 with the same result
  3. Addons are irrelevant, this is a low-level browser issue that happens in new profile with no addons installed

I believe this IS reproducible on any Linux machine without real hardware with v4l2-loopback and GStreamer generating the actual MJPEG stream for instance. If you have difficulties with that, I can adapt one of the tutorials readily available with instructions on how to do that.

Flags: needinfo?(nazar)

Thank you Nazar for the reply! Could you please provide a testcase or one tutorial on how to reproduce the issue.

Looks like v4l2loopback has limited support for MJPEG and the formats it does support work fine with Firefox, so I think you'll need real hardware to reproduce this.
Let me know if there is some other information I can provide from my side, I still have the hardware and should have it in foreseeable future.

So I've got a new webcam, it is primarily using MJPEG since it supports up to 4k resolution via USB 2.0.
The problem is that while Chromium has no problem supporting 4k, Firefox stops at 1080p for some reason.
I think it is still the same issue years later.

Quick test on https://webrtchacks.github.io/WebRTC-Camera-Resolution/ lists all resolutions as supported on Chromium (I suspect it resizes video to smaller resolution from a larger one), while Firefox only supports 1080p, 720p and 640x480. For 4k I'm getting OverconstrainedError.

Here is what webcam supports natively:

v4l2-ctl --device=/dev/video1 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture

[0]: 'MJPG' (Motion-JPEG, compressed)
	Size: Discrete 1920x1080
		Interval: Discrete 0.017s (60.000 fps)
		Interval: Discrete 0.020s (50.000 fps)
		Interval: Discrete 0.033s (30.000 fps)
		Interval: Discrete 0.040s (25.000 fps)
		Interval: Discrete 0.042s (24.000 fps)
		Interval: Discrete 0.050s (20.000 fps)
		Interval: Discrete 0.067s (15.000 fps)
	Size: Discrete 3840x2160
		Interval: Discrete 0.033s (30.000 fps)
		Interval: Discrete 0.040s (25.000 fps)
		Interval: Discrete 0.042s (24.000 fps)
		Interval: Discrete 0.050s (20.000 fps)
		Interval: Discrete 0.067s (15.000 fps)
	Size: Discrete 1280x720
		Interval: Discrete 0.017s (60.000 fps)
		Interval: Discrete 0.020s (50.000 fps)
		Interval: Discrete 0.033s (30.000 fps)
		Interval: Discrete 0.040s (25.000 fps)
		Interval: Discrete 0.042s (24.000 fps)
		Interval: Discrete 0.050s (20.000 fps)
		Interval: Discrete 0.067s (15.000 fps)
[1]: 'YUYV' (YUYV 4:2:2)
	Size: Discrete 640x360
		Interval: Discrete 0.033s (30.000 fps)
		Interval: Discrete 0.040s (25.000 fps)
		Interval: Discrete 0.042s (24.000 fps)
		Interval: Discrete 0.050s (20.000 fps)
		Interval: Discrete 0.067s (15.000 fps)
	Size: Discrete 640x480
		Interval: Discrete 0.033s (30.000 fps)
		Interval: Discrete 0.040s (25.000 fps)
		Interval: Discrete 0.042s (24.000 fps)
		Interval: Discrete 0.050s (20.000 fps)
		Interval: Discrete 0.067s (15.000 fps)

Interestingly, 640x360 also fails, despite being supported by the webcam. Out of 5 resolutions it only supports 3.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: