Configurable screen share bitrate ceiling for self-hosted instances #3212
Unvarying8964
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Current problem
Summary
On a self-hosted instance there is currently no way for the operator to raise (or lower) the screen share bitrate, the ceiling is hardcoded in the web client.
I'd like the bitrate ceiling to be configurable per instance, ideally through the existing limit configuration.
Current behaviour
The screen share bitrate is computed client-side in
fluxer_app/src/features/voice/utils/ScreenShareOptions.ts:SCREEN_SHARE_MAX_VIDEO_BITRATE_BPS = 9_000_000(hard cap)SCREEN_SHARE_BITS_PER_PIXEL_PER_FRAME = 0.02BITRATE_KBPStable gives a per-resolution/frame-rate floorwhich works out to roughly:
These are sensible defaults for fluxer.app, where the media servers' bandwidth is shared by everyone. On a self-hosted instance the operator controls the LiveKit server and its bandwidth, and may want noticeably higher quality for gaming streams or text-heavy content. For example, 1440p60 at 6 Mbps is quite limiting for fast-moving content.
Proposed change
Proposal
Add a limit key, e.g.
max_screen_share_bitrate(bps, user scope), next tofeature_higher_video_quality:SCREEN_SHARE_MAX_VIDEO_BITRATE_BPS.BITRATE_KBPSfloors (or the bits-per-pixel factor) proportionally, so that common presets like 1080p60/1440p60 actually benefit, not just 4K60.Since limits are already published to clients through the instance's limit configuration, this needs no new transport. Operators could set it per rule/trait like any other limit, through the admin panel.
Why not just fork
The file changed several times recently (#2381, #2414, #2434, #2840, #3139), so a downstream patch has to be redone often. A config value would make it maintenance-free for self-hosters. It would also carry over automatically once the desktop app can connect to self-hosted instances, since the desktop app loads the instance's web client.
Environment
Self-hosted via the install script, using the web client served by the instance.
Additional information
No response
Acknowledgements
All reactions