Open Bug 1703991 Opened 4 years ago Updated 2 months ago

getDisplayMedia() doesn't downscale by source pixel ratio by default

Categories

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

Desktop
All
defect

Tracking

()

People

(Reporter: jib, Assigned: pehrsons)

References

(Depends on 3 open bugs)

Details

The spec says: "The user agent SHOULD downscale by the source pixel ratio by default, unless otherwise directed by applied constraints."

I.e. on Retina macs where window.devicePixelRatio is 2, we should halve the width and height of unconstrained capture.

STRs:

  1. https://jsfiddle.net/jib1/5e1cbpyt/show

Expected result (Chrome):

  • 1536 x 960

Actual result (Firefox):

  • 3072 x 1920
Severity: -- → S4
Priority: -- → P3
Severity: S4 → S3

We're seeing performance issues with 4K, so we should up-prioritize this.

Priority: P3 → P2

With https://jsfiddle.net/jib1/pc8yedw6/ (Click Go & share Entire Screen) I see this difference on my 2019 MBP with macOS 10.15.7 (19H1030):

  • Firefox (1536 x 960): Framerate: ~8
  • Chrome (1536 x 960): Framerate: ~29

That fiddle already downscales to 1536 x 960 using constraints, which suggests that fixing this bug likely won't help, and that the underlying problem is likely deeper, as suggested in bug 1703522 comment 4.

See Also: → 1703522
Assignee: nobody → jib
Priority: P2 → P3
See Also: → 1958076

This shouldn't be too hard to fix, and makes the resizeMode handling complete in bug 1286945.

Assignee: jib → apehrson
Blocks: 1286945
Status: NEW → ASSIGNED

A tad bit more complicated than I thought, because the libwebrtc capturers only tag frames with the appropriate scaling number on Windows.

No longer blocks: 1286945
Status: ASSIGNED → NEW
Depends on: 1286945
Depends on: 1984354
Depends on: 1984356
Depends on: 1984357
You need to log in before you can comment on or make changes to this bug.