jitsi / jitsi-meet

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
https://jitsi.org/meet
Apache License 2.0
22.88k stars 6.69k forks source link

A lighter (and/or auto-scaling) alternative to audio levels to reduce browser/client CPU usage? #6920

Closed nekohayo closed 3 years ago

nekohayo commented 4 years ago

As was discovered in https://community.jitsi.org/t/host-a-meeting-with-500-people-ideas/34672/4, the audio levels indicator feature seems to be causing significant amounts of CPU usage in browsers, which in turn tend to increase heat, ventilation, noise, choppiness, etc.

I was wondering if you have particular plans to optimize this automatically (especially when there are more than a handful of participants?), because appending #disableAudioLevels=true to the URL is not something that we can reasonably expect non-geeks / casual users to discover and do.

I like knowing who's speaking right now, and having some sort of confirmation that their microphone is working, but I don't need to see a fancy high-resolution vumeter updated at 60fps.

I am just guessing here, but I suspect that showing a static icon could "do the job" while using virtually no CPU at all, and you could even do it with unicode characters such as :

...as found on https://graphemica.com/characters/tags/sound

So you could have these indicator "icon" states, automanaged and updated at most once every 250-1000ms:

  1. Nothing shown when the person is not talking
  2. 🔈 shown when the person has "recently" talked but no sound is "currently" detected (and then reset to state 1 after a few seconds)
  3. 🔉 and 🔊 alternating to indicate sound being currently detected

This is basically how Mumble and how videogames have tackled the problem (in Planetside2 for example, if someone speaks locally they have a static speaker icon over their head, probably because that game can have hundreds of players at once in a map area)

(this proposal does not influence the muted and quelched status icons, it's really about replacing the audio levels with something less cpu-expensive...)

tdrp commented 4 years ago

Incidentally is this also a working fix for the mobile version (or is there a similar toggle)? We've had battery overheat warnings after only 5 minutes on a 3-person conference

https://github.com/jitsi/jitsi-meet/issues/6683#

saghul commented 4 years ago

This is not enabled on mobile.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

afranke commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Yet another activity-to-prevent-stupid-bot-from-closing-still-valid-issue.

tpo commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Yet another activity-to-prevent-stupid-bot-from-closing-still-valid-issue.

Being both sarcastic and meaning it: we need a anti stale bot bot that reopens tickets closed by the stupid stale bot...

Rant:I think the pinnacle of idiocy is creating automata that force people to spend their precious lifetime circumventing the automata's brainvoid actions. That is the reason why I do not report bugs against Ubuntu anymore. The later is infested with idiotic bots that keep on mechanically closing bug reports. Same reasoning for forcing us to train Google's Skynet AI via captchas that will only come to haunt us later. This enslavement of humans by algorithms will only keep on amplifying and will evolve into an arms race of bots imposing bureacracy and bots circumventing the latter, with the only net effect of making living much harder and brittle and heating up the atmosphere.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

afranke commented 3 years ago

Oh, look! Activity!

saghul commented 3 years ago

Disabling audio levels not only disables the UI animation but also the actual mechanism that did the measuring. Thus, it's not a good metric to determine if the animation is the culprit. At least not without a perf sample which exhibits the issue. I have been trying to prove this myself, to no avail.

In https://github.com/jitsi/lib-jitsi-meet/pull/1245 the way to detect audio levels was reworked to use a more performant one, on supported browsers.