Open Bug 1193640 Opened 9 years ago Updated 2 years ago

Unable to get Camera resolution in 16:9 aspect ratio(640x360) on Mac

Categories

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

42 Branch
defect

Tracking

()

People

(Reporter: balwant.bisht, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36

Steps to reproduce:

Tried to get camera & microphone using following constraint

{"audio":{"deviceId":{"exact":"Jn8yI/KNaSDmAHAQ/pERvTVh40PXtEOlqQQ4PbvSoNw="}},"video":{"width":{"min":640,"ideal":640,"max":640},"height":{"min":360,"ideal":360,"max":360},"deviceId":{"exact":"3ekclOAO05zTC0UEJ8Nsug5C/fI4tz/hvcNSPmzmGUY="}}}

I have tried above with following camera
- FaceTime HD Camera
- Logitech Webcam-C100
- Microsoft® LifeCam Cinema(TM)


Actual results:

Got error callback


Expected results:

Should get success callback with correct media stream
Status: UNCONFIRMED → NEW
Component: Untriaged → WebRTC: Audio/Video
Ever confirmed: true
Product: Firefox → Core
backlog: --- → webrtc/webaudio+
Rank: 27
Depends on: 1180725
Priority: -- → P2
This problem is not limited to Macs. I am being restricted to a 4:3 resolution on a Windows PC even though a 16:9 resolution is specified.
marekzs, we happen to know that Balwant's problem was specific to Mac, so if you could file a separate bug with your camera and system information, as well as steps to reproduce, that should let us track your issue specifically: https://bugzilla.mozilla.org/enter_bug.cgi?product=Core&component=WebRTC%3A%20Audio%2FVideo

Thanks.
I have tried 640x360 resolution with following camera on Windows10 & Firefox Nightly

- USB 2.0 (in built camera)
  result: 640x480 resolution

- Logitech Webcam-C100
  result: 640x360 but camera stopped working after 1-2 sec and initial video frame was also corrupted

- Microsoft® LifeCam Cinema(TM)
  result: Firefox Nightly crashing showing "Tab crashed"
Hi,

We at Cisco are also facing this issue. We are not able to get multi resolution. Also we are not able to get 16:9 aspect ratio. Please give an update on this issue. This is not Mac specific issue. Happens on windows/linux too.
rdaware, the OP's bug is specific to Mac (because we hardcode capabilities there, bug 1180725).

For PC, see bug 1194640 which marekzs filed right after comment 2 here, which turned out to be a mismatch in expectations, and includes a workaround that turned out to be satisfactory (unlike Chrome, Firefox never crops native camera resolutions).

Does this link give you 16:9? http://jsfiddle.net/swytxe44/
If it does, make sure you are using standard constraints. [1]

If none of this solves your problem, please file a new bug with your camera and system information, as well as steps to reproduce, as that will help us track your issue specifically: https://bugzilla.mozilla.org/enter_bug.cgi?product=Core&component=WebRTC%3A%20Audio%2FVideo

Thanks.

[1] https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#Parameters
(In reply to Jan-Ivar Bruaroey [:jib] from comment #5)
> rdaware, the OP's bug is specific to Mac (because we hardcode capabilities
> there, bug 1180725).
> 
> For PC, see bug 1194640 which marekzs filed right after comment 2 here,
> which turned out to be a mismatch in expectations, and includes a workaround
> that turned out to be satisfactory (unlike Chrome, Firefox never crops
> native camera resolutions).
> 
> Does this link give you 16:9? http://jsfiddle.net/swytxe44/
> If it does, make sure you are using standard constraints. [1]
> 
> If none of this solves your problem, please file a new bug with your camera
> and system information, as well as steps to reproduce, as that will help us
> track your issue specifically:
> https://bugzilla.mozilla.org/enter_bug.
> cgi?product=Core&component=WebRTC%3A%20Audio%2FVideo
> 
> Thanks.
> 
> [1]
> https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/
> getUserMedia#Parameters

I have filed a new bug. I am not able to get 16:9 ratio on 90p. Please refer to this bug : https://bugzilla.mozilla.org/show_bug.cgi?id=1227343

Thanks.
jib, munroe: is this resolved?
Flags: needinfo?(mchiang)
Flags: needinfo?(jib)
My Logitech c910 does not have 640x360 even with AVFoundation, and my internal MBP cam is busted, so someone else would need to verify the internal cam. Here's a fiddle to use: https://jsfiddle.net/he5v1trq/
Flags: needinfo?(jib)
Neither MBP internal cam or my Logitech c920r support 640x360 with AVFoundation.

my MBP internal cam supported resolution:
D/MediaManager Capability: 1280 x  720 x 30 maxFps, YUY2, Unknown codec. Distance = 1000
D/MediaManager Capability: 1280 x  720 x 30 maxFps, UYVY, Unknown codec. Distance = 1000
D/MediaManager Capability: 1280 x  720 x 30 maxFps, NV12, Unknown codec. Distance = 1000
D/MediaManager Capability:  640 x  480 x 30 maxFps, YUY2, Unknown codec. Distance = 250
D/MediaManager Capability:  640 x  480 x 30 maxFps, UYVY, Unknown codec. Distance = 250
D/MediaManager Capability:  640 x  480 x 30 maxFps, NV12, Unknown codec. Distance = 250
D/MediaManager Capability:  320 x  240 x 30 maxFps, YUY2, Unknown codec. Distance = 833
D/MediaManager Capability:  320 x  240 x 30 maxFps, UYVY, Unknown codec. Distance = 833
D/MediaManager Capability:  320 x  240 x 30 maxFps, NV12, Unknown codec. Distance = 833

Logitech c920r supported resolution:
D/MediaManager Capability:  160 x   90 x 30 maxFps, MJPEG, Unknown codec. Distance = 1500
D/MediaManager Capability:  160 x  120 x 30 maxFps, MJPEG, Unknown codec. Distance = 1416
D/MediaManager Capability:  176 x  144 x 30 maxFps, MJPEG, Unknown codec. Distance = 1325
D/MediaManager Capability:  320 x  180 x 30 maxFps, MJPEG, Unknown codec. Distance = 1000
D/MediaManager Capability:  320 x  240 x 30 maxFps, MJPEG, Unknown codec. Distance = 833
D/MediaManager Capability:  352 x  288 x 30 maxFps, MJPEG, Unknown codec. Distance = 650
D/MediaManager Capability:  432 x  240 x 30 maxFps, MJPEG, Unknown codec. Distance = 658
D/MediaManager Capability:  640 x  480 x 30 maxFps, MJPEG, Unknown codec. Distance = 250
D/MediaManager Capability:  800 x  448 x 30 maxFps, MJPEG, Unknown codec. Distance = 396
D/MediaManager Capability:  864 x  480 x 30 maxFps, MJPEG, Unknown codec. Distance = 509
D/MediaManager Capability:  800 x  600 x 30 maxFps, MJPEG, Unknown codec. Distance = 600
D/MediaManager Capability: 1024 x  576 x 30 maxFps, MJPEG, Unknown codec. Distance = 750
D/MediaManager Capability:  960 x  720 x 30 maxFps, MJPEG, Unknown codec. Distance = 833
D/MediaManager Capability: 1280 x  720 x 30 maxFps, MJPEG, Unknown codec. Distance = 1000
D/MediaManager Capability: 1600 x  896 x 30 maxFps, MJPEG, Unknown codec. Distance = 1198
D/MediaManager Capability: 1920 x 1080 x 30 maxFps, MJPEG, Unknown codec. Distance = 1332
D/MediaManager Capability:  160 x   90 x 30 maxFps, YUY2, Unknown codec. Distance = 1500
D/MediaManager Capability:  160 x  120 x 30 maxFps, YUY2, Unknown codec. Distance = 1416
D/MediaManager Capability:  176 x  144 x 30 maxFps, YUY2, Unknown codec. Distance = 1325
D/MediaManager Capability:  320 x  180 x 30 maxFps, YUY2, Unknown codec. Distance = 1000
D/MediaManager Capability:  320 x  240 x 30 maxFps, YUY2, Unknown codec. Distance = 833
D/MediaManager Capability:  352 x  288 x 30 maxFps, YUY2, Unknown codec. Distance = 650
D/MediaManager Capability:  432 x  240 x 30 maxFps, YUY2, Unknown codec. Distance = 658
D/MediaManager Capability:  640 x  480 x 30 maxFps, YUY2, Unknown codec. Distance = 250
D/MediaManager Capability:  800 x  448 x 30 maxFps, YUY2, Unknown codec. Distance = 396
D/MediaManager Capability:  864 x  480 x 24 maxFps, YUY2, Unknown codec. Distance = 509
D/MediaManager Capability:  800 x  600 x 24 maxFps, YUY2, Unknown codec. Distance = 600
D/MediaManager Capability: 1024 x  576 x 15 maxFps, YUY2, Unknown codec. Distance = 750
D/MediaManager Capability:  960 x  720 x 15 maxFps, YUY2, Unknown codec. Distance = 833
Flags: needinfo?(mchiang)
This might be a WONTFIX then, or we need to decide whether we want to support cropping whenever we decide to downscale native resolutions, and close a duplicate of that.
Mass change P2->P3 to align with new Mozilla triage process.
Priority: P2 → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.