E2E Test: select video quality when publish simulcast video track.#646
Open
cloudwebrtc wants to merge 2 commits intomainfrom
Open
E2E Test: select video quality when publish simulcast video track.#646cloudwebrtc wants to merge 2 commits intomainfrom
cloudwebrtc wants to merge 2 commits intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an end-to-end pytest that verifies LiveKit simulcast layer switching from a Python publisher across both VP8 and H.264 codecs.
The test publishes a 1280×720 video track (rolling colored bars, generated as I420 with numpy) with
simulcast=True, subscribes from a second room, and then drives the receiver throughRemoteTrackPublication.set_video_quality(HIGH/MEDIUM/LOW). For each layer it asserts the decoded frames converge to roughly the expected dimensions (within ±20% tolerance, requiring 5 consecutive matching frames):HIGHfMEDIUMhLOWqParameterized over
VP8andH264. A 5-second post-subscription warmup is included so the encoder and bandwidth estimator stabilize at the highest layer before quality switches begin.Dependency
This test depends on livekit/rust-sdks#1052, which fixes
TrackPublication.simulcastedto derive from the non-deprecatedTrackInfo.codecs[*].layersfield. Without that fix, modern LiveKit servers (1.10+) reportinfo.simulcast=false(deprecated field), soset_video_qualitybecomes a silent no-op and this test fails on all non-HIGHlayers.This E2E test will only pass after
livekit/rust-sdks#1052is merged and a newlivekit-ffirelease that includes it is published and consumed bylivekit-rtc. Until then, the test should be expected to fail in CI (or be markedxfail/ skipped at the workflow level).Requires
LIVEKIT_URL,LIVEKIT_API_KEY,LIVEKIT_API_SECRETenv vars (test is auto-skipped otherwise).numpy(already a dependency oflivekit-rtc).livekit-ffirelease containing fix: derivesimulcastedfrom non-deprecated TrackInfo fields rust-sdks#1052.Test plan
pytest livekit-rtc/tests/test_change_video_quality.py -v -spasses against a current LiveKit server (verified locally on server1.10.1with a patched FFI dylib, both VP8 and H264).tests/suite.rust-sdks#1052is released and the FFI binary is updated.