LiveKit SDK for Python
Python SDK to integrate LiveKit's real-time video, audio, and data capabilities into your Python applications using WebRTC. Designed for use with LiveKit Agents to build powerful voice AI apps.
See https://docs.livekit.io/ for more information.
Publishing pre-encoded video
Use EncodedVideoSource when an upstream encoder already provides compressed
frames. The source uses the same native passthrough encoder as the Rust SDK;
Python does not decode or re-encode the video.
from livekit import rtc
source = rtc.EncodedVideoSource(width=640, height=360)
track = rtc.LocalVideoTrack.create_video_track("camera", source)
await room.local_participant.publish_track(
track,
rtc.TrackPublishOptions(
video_codec=rtc.VideoCodec.VP9,
video_encoder=rtc.VideoEncoderBackend.ENCODER_BACKEND_PRE_ENCODED,
simulcast=False,
),
)
# Supply each complete encoded frame at its playback time.
source.capture_frame(rtc.EncodedVideoFrame(
data=encoded_vp9_frame,
width=640,
height=360,
codec=rtc.VideoCodec.VP9,
frame_type=rtc.EncodedFrameType.ENCODED_FRAME_KEY,
timestamp_us=capture_timestamp_us,
))
feedback = source.take_feedback()
# Forward feedback.keyframe_requested and feedback.rate_control to your encoder.
# At shutdown, unpublish the track and release the source:
await room.local_participant.unpublish_track(track.sid)
await source.aclose()
Supported codecs are H.264, H.265, VP8, VP9 and AV1, subject to receiver support. Submit complete access units (Annex B for H.264/H.265), not WebM/MP4 container bytes or RTP packets. A container must first be demuxed; demuxing extracts compressed frames and does not reconstruct pixels. The codec must match the publication and stay fixed, and simulcast must be disabled.
The caller controls pacing and handles keyframe and bitrate feedback. In particular, a prerecorded file cannot generate a new keyframe on demand for a late subscriber or after packet loss. WebM's auxiliary alpha data is not part of the VP9 color access unit and is not transported by this API.
Metadata
Release files for livekit 1.1.21
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| livekit-1.1.21.tar.gz | 400.3 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| livekit-1.1.21-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| livekit-1.1.21-py3-none-manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.28+ x86-64 | Details |
| livekit-1.1.21-py3-none-manylinux_2_28_aarch64.whl | Python 3 | none | Linux glibc 2.28+ ARM64 | Details |
| livekit-1.1.21-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
| livekit-1.1.21-py3-none-macosx_10_15_x86_64.whl | Python 3 | none | macOS 10.15+ x86-64 | Details |
Total release size: 53.6 MB
Release files / livekit-1.1.21.tar.gz
| Download URL | livekit-1.1.21.tar.gz |
|---|---|
| Size | 400.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c6c1783a99954147e46995087cbbfb77844049c0d53c33b761e0dfa7ff47256c
|
|
BLAKE2b-256 checksum How to use checksums |
1ec79a666b4a218c1f308b701cb5cd523a49532e7280c6dcc5cab909b8a8adf4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / livekit-1.1.21-py3-none-win_amd64.whl
| Download URL | livekit-1.1.21-py3-none-win_amd64.whl |
|---|---|
| Size | 11.0 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
0f4bafc5d51cf686dbe308762fa4431e89503ee8348539924438c305a8019a54
|
|
BLAKE2b-256 checksum How to use checksums |
79d9af91fb1f33435bcc880116a0e6d16e0c8910d53b77204fc17099cd3099c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / livekit-1.1.21-py3-none-manylinux_2_28_x86_64.whl
| Download URL | livekit-1.1.21-py3-none-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 11.8 MB |
| Tags | Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
148553a7d6515cf0c373f591f962de221253fe305d0a84857f2955f520a54340
|
|
BLAKE2b-256 checksum How to use checksums |
e5804078ee9bebe69ac35cd2c0b3a20f80862f71421d3fd8f3d28d4e1f735d98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / livekit-1.1.21-py3-none-manylinux_2_28_aarch64.whl
| Download URL | livekit-1.1.21-py3-none-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 10.6 MB |
| Tags | Linux glibc 2.28+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
4a2b036ba93a8d640b3770d62de1a9ee315824c9d2a0d7fbe1d1f26ecfa9ec6e
|
|
BLAKE2b-256 checksum How to use checksums |
faec305511fc9c3041881730d46bbf6969a6bf57921237f09afd14ea7bcd5fbc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / livekit-1.1.21-py3-none-macosx_11_0_arm64.whl
| Download URL | livekit-1.1.21-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 9.3 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
b08c79ceaa5724a8a3d115c66f448fdc33a31c4cda883110d742209ec98a777c
|
|
BLAKE2b-256 checksum How to use checksums |
56e01703a82d8a0005fcaa36236ed6fc122f865456aceaffff9e94f3e5132a08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / livekit-1.1.21-py3-none-macosx_10_15_x86_64.whl
| Download URL | livekit-1.1.21-py3-none-macosx_10_15_x86_64.whl |
|---|---|
| Size | 10.5 MB |
| Tags | Python 3 macOS 10.15+ x86-64 |
|
SHA-256 checksum How to use checksums |
76c29bc95b771fb37a8f32371163eb6f48404cb880ad27bcadfbf2a5801514aa
|
|
BLAKE2b-256 checksum How to use checksums |
ad0811d76335c9f2fb86dc34309f2829b33a40bb452477658aee131f50691594
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency log