Closed Bug 1529907 Opened 6 years ago Closed 6 years ago

OverconstrainedError: Firefox on macOS fails to capture video from camera


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




Tracking Status
firefox65 --- wontfix
firefox66 - fix-optional
firefox67 --- fix-optional


(Reporter: firefox-bugs, Assigned: dminor)



(Keywords: regression)

Dramatis Personae.
Apple computer.
OS X High Sierra and higher.
A webcam with CIF resolution or alike.
Firefox 64+.

Steps to reproduce:

  1. Try to capture video stream from camera while setting maximum dimensions, something like this:
let constraints = {
    audio: true,
    video: {
        height: {max: 180},
        width: {max: 320}


Expected results:

  1. MediaStream of requested size.

Actual results:

  1. Firefox runs into OverconstrainedError.

It does work on Firefox on Windows with the same camera. When camera's lowest possible resolution is like 352x288 but client code try to capture 320x180 at max, it still gets the media stream of requested size. The same code with the same camera throws exception on macOS.

Is that a new issue from 64? Thanks

Component: Untriaged → WebRTC
Flags: needinfo?(firefox-bugs)
Product: Firefox → Core
Summary: Firefox on macOS fails to capture video from camera → OverconstrainedError: Firefox on macOS fails to capture video from camera

Hello, Sylvestre,

No, it is applicable for older releases.

Flags: needinfo?(firefox-bugs)

Confirmed not working on my 2015 era Macbook. Works as expected on my Linux system. Similar problem reported with constraints on OS X over in Bug 1530792.

Rank: 15
Ever confirmed: true
Priority: -- → P2
See Also: → 1530792

Also regressed by the OS X video capture changes in Bug 1376873.

Assignee: nobody → dminor
Blocks: 1376873

[Tracking Requested - why for this release]:
Recent regression

I'll defer to dminor saying this is a regression.

Just wanted to manage expectations in comment 0:

Note that we still don't downscale native camera resolutions, except to solve simultaneous-use conflicts (bug 1286945), so expectations of similar behavior across different hardware won't hold in Firefox and the spec. What will work may in fact depend on the specific hardware camera used, and sometimes its OS-specific driver.

There's a bit of irony in the complexity of the discovery-based constraints language and the much simpler rescaling function people expect.

This appears to be a limitation of the OS X video capture implementation in The allowed resolutions are in a table of presets here [1], and like jib says, there's no guarantee that we'll downscale. We're more or less stuck with this unless someone fixes the upstream implementation or we switch to a different video capture implementation, for instance Chromium's in Bug 1451394. I'm resolving this as a dupe of that bug.

This isn't so much a regression as a change in behaviour due to switching video capture APIs on OS X in Bug 1376873.


Closed: 6 years ago
Resolution: --- → DUPLICATE
Component: WebRTC → WebRTC: Audio/Video
You need to log in before you can comment on or make changes to this bug.