Screen share 2: Spike — LiveKit video publish/receive and codec facts (#149) #187
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "screenshare-2-spike-livekit-video"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
The Screen share 2 spike. It adds no production code (that is Screen share 16/17).
crates/fluxer-voice/tests/livekit_video_spike.rsdriveslivekitdirectly. It contains three tests, each#[ignore]d and doing nothing unlessFLUXER_LIVEKIT_TESTS=1.cargo xtask cinever runs this file: its LiveKit step runs onlylivekit_interop.encoder_backends:VideoEncoderBackend::list_available(),video_encoder_codecs(backend)for every backend, and the RTP sender capabilities.decode_probe: the RTP receiver capabilities for video.publish_receive_matrix: session A publishes a 1280×720/30 and a 1920×1080/30Screensharetrack (simulcast: false,stream: "screen_share") with every codec of the software backend and of every hardware backend present, plus Auto. Session B subscribes and counts decoded frames for 5 s. The output is a table of frames pushed, encoded, received and decoded, the encoder and decoder implementation names, encode and decode time, process CPU and bitrate. The frames are built inline (I420 moving bars over a noise texture), so the spike does not depend on Screen share 1.docs/superpowers/research/2026-11-11-screenshare-spikes.md§1 has the findings.Main findings (spikes §1)
webrtc-a545de4defines:WEBRTC_USE_H264,RTC_USE_LIBAOM_AV1_ENCODER,RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY,WEBRTC_USE_PIPEWIRE(plusRTC_ENABLE_H265, X11). Windows: the same minus PipeWire/X11, plus WGC. I read the Windows defines from the release zip's ninja files, not from the runner's log.ffmpeg_branding = "Chrome"and the SDK's own decoder probe passes, so the receiver capabilities include H264 and frames arrive (decoderFFmpeg). This corrects spec §8.1/§15. For Screen share 12/17 the decodable set should be the receiver capabilities. No bundled-sample probe is needed.renderD128/renderD129, andLIBVA_DRIVER_NAME=nvidiahides it. The CI and release images have nolibva-devtoday. Windows builds no hardware encoder (from source).livekit::rtc_engine::lk_runtime::LkRuntime::instance().pc_factory().libvpx,libaom,OpenH264andVAAPI H264 Encoder.powerEfficientEncoderis true only for VAAPI.How it was tested
livekit-serverv1.12.0--devon loopback. Software VP8 at 720p (the test's assertion) delivered frames, and so did every other codec and backend.encoder_backendsthree times: withLIBVA_DRIVER_NAMEunset, with it set tonvidia, and in a separate build with libva hidden from pkg-config. The last build loggedlibva not found; building without hardware accelerated video codecs.FLUXER_SCREENSHOT_TESTS=1 cargo xtask cipasses locally.FLUXER_LIVEKIT_TESTS. The doc says which Windows facts come from source.Deviations from the plan
list_available()was inferred from source. It was not run.Closes #149
🤖 Generated with Claude Code
Independent review: Screen share 2 (spike, LiveKit video), commit
6d989f4Scope:
git diff 53e3d60..origin/screenshare-2-spike-livekit-video. Two files changed:crates/fluxer-voice/tests/livekit_video_spike.rsand spikes §1.Plan steps. The test has
encoder_backends,decode_probeandpublish_receive_matrix. Each is#[ignore]and returns early unlessFLUXER_LIVEKIT_TESTS=1. Session A publishes aNativeVideoSource(is_screencast) withTrackSource::Screenshareandsimulcast: falseat 1280×720/30, plus 1080p/30, once per encodable codec. Session B auto-subscribes and counts decoded frames and their size over a 5 s window. The I420 moving bars are built inline, so nothing depends onfluxer-video.xtasknever runs this file: the screenshot step's--ignoredrun removesFLUXER_LIVEKIT_TESTS, and the interop step runs--test livekit_interoponly.Interfaces (facts). §1 answers every question the plan lists.
webrtc.ninjaandargs.gnin a local Linux prebuilt.WEBRTC_USE_H264,RTC_USE_LIBAOM_AV1_ENCODER,RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY,WEBRTC_USE_PIPEWIREandffmpeg_branding = "Chrome"are all present.list_available()andvideo_encoder_codecsare recorded per backend.LkRuntime::instance().pc_factory()is reachable. I checked thatpub mod lk_runtime,pub fn instanceandpub fn pc_factoryare public in livekit 0.10.1.Invariants. No crate code or
Cargo.tomlchanged. Every dependency the test uses (livekit-api,futures-util,tokio) was already a dev-dependency offluxer-voice. The only key is the publiclivekit-server --devpair,devkey/secret, whichlivekit_interop.rsandtools/livekit-test-server.shalready use. There are no real tokens. TheVideoEncoderBackendvariants are not cfg-gated, so the file compiles on Windows./proc/self/statreturnsNonethere.Review Focus 3 (codec advertisement). §1.3 corrects spec §8.1/§15: H264 does decode on the Linux prebuilt. I confirmed
IsInternalH264DecoderAvailable()inwebrtc-sys0.3.53src/video_decoder_factory.cpp. It does a realConfigure()probe, so H264 is advertised only when FFmpeg can decode it. That supports the guidance for Screen share 12/17: decodable = receiver capabilities, and the encodable set never comes from sender capabilities, because they list H265.Findings
webrtc-win-x64-release.zip, not from the Windows runner's build log as the plan asks. The archive is the same artefact, so this deviation is acceptable, and it is documented. Windowslist_available()and H264 decode are inferred from source and were not run. §1.6 says so and hands the check to the Screen share 17 startup probe. That probe must report it.Claude Opus 5.5, whileCLAUDE.mdsaysFable 5.2. This matches the session-level attribution the workflow uses and the recent commits onvoice. No action needed unless the integrator wantsCLAUDE.mdupdated.libva-dev, so builds today have no VAAPI.Local gate:
FLUXER_SCREENSHOT_TESTS=1 cargo xtask ciin a fresh review worktree →==> xtask ci: all steps passed.Verdict: approve. No blocking findings, and local CI is green.