aws / amazon-chime-sdk-js

A JavaScript client library for integrating multi-party communications powered by the Amazon Chime service.
Apache License 2.0
699 stars 472 forks source link

Downgrade video codec when encoding CPU usage is high or encoder fail #2860

Closed shi-su closed 2 months ago

shi-su commented 3 months ago

Issue #:

Description of changes: Downgrade video codec when encoding CPU usage is high or encoder fail

Testing: Tested codec degradation from software encoder CPU usage with a lowered threshold.

Can these tested using a demo application? Please provide reproducible step-by-step instructions. No

Checklist:

  1. Have you successfully run npm run build:release locally? y

  2. Do you add, modify, or delete public API definitions? If yes, has that been reviewed and approved? n

  3. Do you change the wire protocol, e.g. the request method? If yes, has that been reviewed and approved? n

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

shi-su commented 3 months ago

good stuff! Maybe we can wire up event reporting here as well, on the decode fallback attempts? Can provide metadata like what codecs we are switching between.

Agree event reporting can be helpful here. Think I can add that in a different PR and have this focus on the metric monitoring and codec degradation.