Closed Bug 1681334 Opened 4 years ago Closed 2 years ago

getUserMedia is unable to access resolutions greater than 1280x720 (720p) on macOS

Categories

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

Firefox 85
Desktop
macOS
defect

Tracking

()

RESOLVED DUPLICATE of bug 1806604
Webcompat Priority P3

People

(Reporter: April, Unassigned)

References

Details

(Keywords: webcompat:platform-bug)

Attachments

(2 files)

Attached image firefox webcam test.png

Webcams that utilize higher resolution 4k sensors or using cameras -> HDMI capture cards are becoming increasingly common. However, in Firefox, I am unable to access these higher resolutions on my Camlink 4K device, which is perhaps the most common HDMI -> Webcam adapter.

If I access the WebRTC sample page:
https://webrtc.github.io/samples/src/content/getusermedia/resolution/

In Firefox, only QVGA, VGA, and HD are available. Higher resolutions (such as full HD or Television 4K) throw an error getUserMedia: Constraints could be not satisfied.

In Chrome, however, I am able to access QVGA, VGA, HD, Full HD, and Television 4K.

I've attached the results from webcamtests.com, for both Firefox 85 (Nightly) and Chrome 87.

Attached image chrome webcam test.png

Hi April, thanks for the bug report! On what OS were you testing? On OS X, the camera code we're using is unfortunately limited to a handful of preset values [1] which might explain what you are seeing.

[1] https://searchfox.org/mozilla-central/rev/71621bfa47a371f2b1ccfd33c704913124afb933/dom/media/systemservices/objc_video_capture/rtc_video_capture_objc.mm#143

Ahh got'cha, yes, I am using macOS (Catalina 10.15.7).

Is there any chance we could update this code to try for higher resolutions? It doesn't seem to be an operating system limitation, as Chrome is able to access higher resolutions. Thanks!

OS: Unspecified → macOS
Hardware: Unspecified → Desktop
Summary: getUserMedia is unable to access resolutions greater than 1280x720 (720p) → getUserMedia is unable to access resolutions greater than 1280x720 (720p) on macOS

There are 2 additional preset options available here[1], AVCaptureSessionPreset1920x1080 and AVCaptureSessionPreset3840x2160. I can throw a opt build on try to see if it is a simple as checking for them.

[1] https://developer.apple.com/documentation/avfoundation/avcapturesessionpreset

Severity: -- → S3

Quick update, those newer presets were introduced in 10.15 based on the following error message:

 0:09.62 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVCaptureSessionPreset.h:130:41: note: 'AVCaptureSessionPreset3840x2160' has been marked as being introduced in macOS 10.15 here, but the deployment target is macOS 10.12.0

I'm going to push to try regardless to see if making this change improves April's issue. If it does, then we can look at options.

Sounds great! I don't have access to a system to build things on currently, but if you're able to point me at a completed build I'd be happy to give it a shot and let you know.

https://treeherder.mozilla.org/jobs?repo=try&revision=b3e2a54ab892a5ed980370344700363743a412a0&selectedTaskRun=Mj3V0H4VQXOar9du1tGNGA.0

Bummer, the build fails on try, but when I was building I was actually on 10.15. When I build on my 10.14 laptop, it fails with the same error as on try. I believe this means we'd have to update our build target in order to support those newer presets.

We have Bug 1451394 on file to update the OS X camera code.

Depends on: 1451394
Priority: -- → P2
Webcompat Priority: --- → ?
Webcompat Priority: ? → P3

This is getting fixed by the new camera backend on mac, which is getting enabled in bug 1806604. I expect it will ship in 114.

Status: NEW → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1806604
Resolution: --- → DUPLICATE

Since this is a dupe, look at bug 1806604 for source of truth.

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

Attachment

General

Created:
Updated:
Size: