Screen share 12 follow-up: rank H264 as software when Encoder path is Prefer software #231

Open
opened 2026-11-12 08:04:13 +00:00 by charles · 0 comments
Owner

Found while doing Screen share 18 (#165); recorded in spikes §5.3.

VoiceEvent::CodecCapabilities.encode is sent once per process and marks H264 hardware: true whenever the SDK's hardware backend lists it (VAAPI or NVENC usable at run time). It does not depend on "Encoder path".

With "Encoder path" = Prefer software, fluxer-voice now publishes H264 with the software backend (OpenH264), but codec negotiation (Screen share 12, #159, spec §3.4) would still rank H264 as a hardware codec, i.e. first. OpenH264 is the worst choice for screen content: it drops most frames on noisy content (spikes §1.4, §5.2: 2-4 fps at 1080p).

Suggested fix, in fluxer-core (codec ranking): treat CodecCap.hardware as false when the current EncodeParams.backend is PreferSoftware, so that the "H264 not hardware" order (av1, h265, vp9, h264, vp8) applies.

Seen on branch screenshare-18-hw-encode-linux.

Found while doing Screen share 18 (#165); recorded in spikes §5.3. `VoiceEvent::CodecCapabilities.encode` is sent once per process and marks H264 `hardware: true` whenever the SDK's hardware backend lists it (VAAPI or NVENC usable at run time). It does not depend on "Encoder path". With "Encoder path" = Prefer software, `fluxer-voice` now publishes H264 with the software backend (OpenH264), but codec negotiation (Screen share 12, #159, spec §3.4) would still rank H264 as a hardware codec, i.e. first. OpenH264 is the worst choice for screen content: it drops most frames on noisy content (spikes §1.4, §5.2: 2-4 fps at 1080p). Suggested fix, in `fluxer-core` (codec ranking): treat `CodecCap.hardware` as false when the current `EncodeParams.backend` is `PreferSoftware`, so that the "H264 not hardware" order (`av1, h265, vp9, h264, vp8`) applies. Seen on branch `screenshare-18-hw-encode-linux`.
charles added this to the Screen share milestone 2026-11-12 08:04:13 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#231
No description provided.