Closed Bug 1159489 Opened 9 years ago Closed 9 years ago

Make WebRTC video min/max bitrates dynamic and dependent on resolution and framerate

Categories

(Core :: WebRTC, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox40 --- affected
firefox41 --- fixed

People

(Reporter: jesup, Assigned: jesup)

References

Details

Attachments

(2 files, 3 obsolete files)

We shouldn't use 200Kbps to 2Mbps as the limits for all video; for low-res inputs (or even really VGA) this is overkill; and the lower-limit is at the near-perfect-quality level for QCIF/QQVGA video.  Similarly, you don't want to send 1920x1080 30fps video at a mere 2Mbps, let alone anything far below it.

Bandwidth adaptation limits should primarily depend on resolution, and secondarily depend on framerate, and also depend (in the future, for things like VP9) on codec.

These should be adaptive to changing input resolution and framerate.
WIP; however it seems to not detect framerate changes because of a problem in the stats code.  Should move the trigger out of the stats callback anyways
Attachment #8598945 - Attachment is obsolete: true
I found why the FPS wasn't getting updated for the encoder - the VideoCodecStats object assumed it could only be used from either an Encode side or a Decode side, but now VideoConduits are encode/decode, so it never registered for EncoderStats callbacks
Comment on attachment 8599104 [details] [diff] [review]
Make bitrate limits for webrtc video depend on input resolution and framerate

Review of attachment 8599104 [details] [diff] [review]:
-----------------------------------------------------------------

I'll remove the trailing spaces, and the XXX comment about locking

f? to mreavy & derf, especially to review the algorithmic choices around selection of rates and the hard-coded values

I should consider adding a followup bug to move the triggering code for FPS changes off of the stats callbacks.
Attachment #8599104 - Flags: review?(pkerr)
Attachment #8599104 - Flags: feedback?(tterribe)
Attachment #8599104 - Flags: feedback?(mreavy)
Comment on attachment 8599107 [details] [diff] [review]
Fix VideoCodecStats to allow for collecting encoder and decoder stats

Review of attachment 8599107 [details] [diff] [review]:
-----------------------------------------------------------------

Need to ensure that these changes are safe and don't mess anything up.
Attachment #8599107 - Flags: review?(jib)
Attachment #8599104 - Flags: review?(pkerr) → review+
Attachment #8599104 - Attachment description: WIP patch to make bitrate limits for webrtc video depend on input resolution and framerate → Make bitrate limits for webrtc video depend on input resolution and framerate
Attachment #8599107 - Flags: review?(jib) → review+
See Also: → 1161079
Comment on attachment 8599107 [details] [diff] [review]
Fix VideoCodecStats to allow for collecting encoder and decoder stats

Moved to a separate bug
Attachment #8599107 - Attachment is obsolete: true
Comment on attachment 8599104 [details] [diff] [review]
Make bitrate limits for webrtc video depend on input resolution and framerate

Review of attachment 8599104 [details] [diff] [review]:
-----------------------------------------------------------------

I think the algorithm you're using is fine.  I'm less confident in the numbers. That is to say, they look fine (based on my experience) but I have no proof they are fine. We could spend a lot of time trying to work through the math using various inputs with not much bang for our buck. I am confident that landing this patch is a move in the right direction.  So, I'd like to land this in Nightly and ask for feedback from our QA folks and from Fred Dixon and his team -- and show them how to play with the numbers to affect the experience.  I'd like to get this testing and feedback done by or before the first week in June.  Fx 41 uplifts from Nightly to Aurora on June 29th.
Attachment #8599104 - Flags: feedback?(mreavy) → feedback+
Attachment #8599104 - Attachment is obsolete: true
Attachment #8599104 - Flags: feedback?(tterribe)
Attachment #8613585 - Attachment description: Atomic<double/float> isn't supported.. → Atomic<double/float> isn't supported.. (interdiff)
Attachment #8613585 - Flags: review?(pkerr)
Attachment #8613586 - Flags: review?(pkerr) → review+
https://hg.mozilla.org/mozilla-central/rev/340c59ea962d
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: