iamDecode / proximity-chat

Proximity video chat for social events, similar to SpatialChat 🍻
Other
8 stars 0 forks source link

Tweak simulcast parameters #48

Open iamDecode opened 3 years ago

iamDecode commented 3 years ago

The current simulcast parameters were just copied from another project and not tweaked carefully: https://github.com/iamDecode/proximity-chat/blob/42cc23af2f0e72088d5d03b5493c76339b330fdc/public/mediasoup-client.js#L27-L34

Some users have reported video lagging behind audio, most likely because their CPU cannot keep up encoding the video. Encodings have an option scaleResolutionDownBy: n which might help to decrease the load. Additionally we should just try to find the lowest possible bitrate that is acceptable. It can be much lower than other video applications as the circle is relatively small.

In addition, perhaps it is a good idea to request user media with a specific, small resolution. In my testing it seemed that chrome will usually output 640x480 (iirc), but there is no way to be sure if not initially constrained. This needs to be tested well: if the constraint fails it will completely block a user from using the system. https://github.com/iamDecode/proximity-chat/blob/42cc23af2f0e72088d5d03b5493c76339b330fdc/public/mediasoup-client.js#L19

iamDecode commented 3 years ago

Additional idea: perhaps it is possible to detect the video/audio desync and trash the quality in order to keep up? Or just determine less powerful hardware?