#228·server

Add ability to change stream resolution in GUI

Author: AbysmalduckCreated Jul 25, 2025Updated Aug 3, 2025
Labelsa:feature

Currently, Screego streams at the monitor's native resolution (e.g., Quad HD/1440p). On higher-resolution displays, this causes severe FPS drops (to near zero) due to excessive bandwidth/encoding demands. Manually modifying the useRoom.ts file to enforce resolution constraints resolves the issue:

typescript
//useRoom.ts; share function
try {
            const constraints = {
                video: {
                    frameRate: loadSettings().framerate,
                    width: { ideal: 1600, max: 1600 },
                    height: { ideal: 900, max: 900 }
                },
                audio: { 
                    echoCancellation: false,
                    autoGainControl: false,
                    noiseSuppression: false,
                    googAutoGainControl: false, }
            };

            stream.current = await navigator.mediaDevices.getDisplayMedia(constraints);

            const [videoTrack] = stream.current.getVideoTracks(); //second time for firefox
            await videoTrack.applyConstraints({
                width: { ideal: 1600, max: 1600 },
                height: { ideal: 900, max: 900 },
                frameRate: loadSettings().framerate
            });
        }

That code works well in Chrome and Firefox, so maybe it's good to add configurable resolution settings in the Screego GUI to let users customize resolution of stream.