Discord: a stream is always 720p30 and cannot be changed #234

Closed
opened 2026-09-23 15:16:50 -04:00 by Salastil · 1 comment
Owner

The encoder is configured from four constants at the top of
src/renderer/src/lib/discordscreen.ts:29-32:

const WIDTH = 1280
const HEIGHT = 720
const FRAMERATE = 30
const BITRATE = 2_500_000

Nothing reads a preference and nothing offers a choice, so every stream is
720p30 at 2.5 Mbit whatever is being shared and whatever the connection can
carry. Discord's own client asks, because the answer genuinely differs:
readable text wants resolution, a game wants frames, and a poor uplink wants
neither.

The cost of getting it wrong is asymmetric. 720p30 is too soft for sharing an
editor or a terminal - the case moho is most likely to be used for - and too
expensive for somebody on a thin connection, who has no way to turn it down and
will simply stall.

The capture is also being scaled to a fixed size regardless of the source's own
shape, so sharing a tall window or a 1440p screen resamples twice for no
reason.

Low priority next to #231 and #232: a fixed 720p30 stream works, it is just not
the right one for everybody.

The encoder is configured from four constants at the top of `src/renderer/src/lib/discordscreen.ts:29-32`: ``` const WIDTH = 1280 const HEIGHT = 720 const FRAMERATE = 30 const BITRATE = 2_500_000 ``` Nothing reads a preference and nothing offers a choice, so every stream is 720p30 at 2.5 Mbit whatever is being shared and whatever the connection can carry. Discord's own client asks, because the answer genuinely differs: readable text wants resolution, a game wants frames, and a poor uplink wants neither. The cost of getting it wrong is asymmetric. 720p30 is too soft for sharing an editor or a terminal - the case moho is most likely to be used for - and too expensive for somebody on a thin connection, who has no way to turn it down and will simply stall. The capture is also being scaled to a fixed size regardless of the source's own shape, so sharing a tall window or a 1440p screen resamples twice for no reason. Low priority next to #231 and #232: a fixed 720p30 stream works, it is just not the right one for everybody.
Salastil added the featurelow priority labels 2026-09-23 15:16:50 -04:00
Author
Owner
Finished https://git.salastil.com/Salastil/nobilis/commit/ac6ef9c https://git.salastil.com/Salastil/nobilis/commit/7b64414 https://git.salastil.com/Salastil/moho/commit/fb5724a https://git.salastil.com/Salastil/moho/commit/414730f
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Salastil/moho#234