Skip to content

feat(rtc): expose pre-encoded video publishing in Python - #838

Open
AmitMY wants to merge 2 commits into
livekit:mainfrom
AmitMY:codex/python-preencoded-video
Open

AmitMY wants to merge 2 commits into
livekit:mainfrom
AmitMY:codex/python-preencoded-video

Conversation

@AmitMY

@AmitMY AmitMY commented Sep 30, 2026 •

Copy link
Copy Markdown

Python currently accepts only raw video frames, so applications with an existing encoded stream must decode and encode it again to publish a media track. Expose the pre-encoded source already supported by the bundled Rust FFI, matching the Rust/Go publishing path.

Adds EncodedVideoSource, EncodedVideoFrame, encoder feedback, and public encoder/frame-type enums. Existing LocalVideoTrack publishing accepts the new source. No Rust, protobuf, native-library, or runtime dependency changes are required. The README covers codec matching, pacing, disabled simulcast, keyframe/bitrate feedback, and why container bytes and WebM alpha are separate concerns.

Validation:

  • Ruff and full SDK mypy pass (excluding the Rust submodule from Python lint/format checks).
  • 136 tests pass; 73 tests requiring server credentials are skipped in the offline suite.
  • All 12 new tests pass with a locally built LiveKit 1.13.7 server and the bundled FFI 0.12.80, including publishing compressed VP9 and verifying decoded pixels on a subscriber.

First part of a stack; #839 adds incremental WebM demuxing for opaque media tracks and a separate example forwarding intact WebM, including alpha, through the existing byte-stream API.

CI also exposed a pre-existing fork PR checkout failure in the protobuf-generation job. It now checks out the head repository, verifies generated stubs read-only on forks, and retains automatic commits for same-repository PRs.

@CLAassistant

CLAassistant commented Sep 30, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Devin Review: 1 flag

Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants