Skip to main content

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.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for livekit 1.2.2
File Size Uploaded Provenance Actions
livekit-1.2.2.tar.gz 404.6 kB With provenance Details for livekit-1.2.2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for livekit 1.2.2
File Actions
livekit-1.2.2-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for livekit-1.2.2-py3-none-win_arm64.whl
livekit-1.2.2-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for livekit-1.2.2-py3-none-win_amd64.whl
livekit-1.2.2-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details for livekit-1.2.2-py3-none-manylinux_2_28_x86_64.whl
livekit-1.2.2-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details for livekit-1.2.2-py3-none-manylinux_2_28_aarch64.whl
livekit-1.2.2-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for livekit-1.2.2-py3-none-macosx_11_0_arm64.whl
livekit-1.2.2-py3-none-macosx_10_15_x86_64.whl Python 3 none macOS 10.15+ x86-64 Details for livekit-1.2.2-py3-none-macosx_10_15_x86_64.whl

Total release size: 62.9 MB

Release files / livekit-1.2.2.tar.gz

Download URL livekit-1.2.2.tar.gz
Size 404.6 kB
Tags Source
SHA-256 checksum
How to use checksums
39cbfed53c125dbb0a7f642094c15888534472f1cd5341fa989bc0a085f34a60
BLAKE2b-256 checksum
How to use checksums
0bcdfe7ec7c5ce7d991e67becb73427fb76d9698ec0d778cfe157de922bf520b
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 Nov 16, 2026.

Transparency log

Release files / livekit-1.2.2-py3-none-win_arm64.whl

Download URL livekit-1.2.2-py3-none-win_arm64.whl
Size 9.1 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
9dc7d0e2b05557f3c470ce86de5d5bd35aa3ce502db3706ad7b94326d09e5343
BLAKE2b-256 checksum
How to use checksums
faa8902cd0ddd4f6a9f5840fc36c556dcbb6a68871511a26346b52c1ac367a41
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 Nov 16, 2026.

Transparency log

Release files / livekit-1.2.2-py3-none-win_amd64.whl

Download URL livekit-1.2.2-py3-none-win_amd64.whl
Size 11.0 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
f8cf0bdcf460246a39c20b3b566eec27ce87412958bc912966af70de1f1c5b9c
BLAKE2b-256 checksum
How to use checksums
33c153d31606d08b76daec8924c2f3cffad4ae97605eb492a07348d606c3a923
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 Nov 16, 2026.

Transparency log

Release files / livekit-1.2.2-py3-none-manylinux_2_28_x86_64.whl

Download URL livekit-1.2.2-py3-none-manylinux_2_28_x86_64.whl
Size 11.9 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
91566509d67ed6fa87abd3b445607d8c8d6b694bd9c96f9083cbdf45dc3505b3
BLAKE2b-256 checksum
How to use checksums
e0b39abe1a35ee00681f709b81243b46535d3c682a592a06547405314006df20
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 Nov 16, 2026.

Transparency log

Release files / livekit-1.2.2-py3-none-manylinux_2_28_aarch64.whl

Download URL livekit-1.2.2-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
53b5a817242cdb6cfcdf4adc5b713d9078f9a8723d6a396a53a955d4117ca43d
BLAKE2b-256 checksum
How to use checksums
5d3cdbb7273325ff7221f0e2efa377eec7fde87c3b71c3f64658241b9a613b12
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 Nov 16, 2026.

Transparency log

Release files / livekit-1.2.2-py3-none-macosx_11_0_arm64.whl

Download URL livekit-1.2.2-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
292f4e8e4585973e1fa720ed9117981bca6e0f2906346373c3c18bb303cf134a
BLAKE2b-256 checksum
How to use checksums
a80080aaed3a6fbb747b1dbae89b6a89c0eca42966bdfcd5088a29579a6b1444
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 Nov 16, 2026.

Transparency log

Release files / livekit-1.2.2-py3-none-macosx_10_15_x86_64.whl

Download URL livekit-1.2.2-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
d0013ebf5bcf8efd8e26027bc9f22fff886d810ff0c9c2a06bcf9b03e6c3c02e
BLAKE2b-256 checksum
How to use checksums
8f92478e8d900450302bba8e215c0dc0cfde90676ce8855fabb3d9940db9f5db
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 Nov 16, 2026.

Transparency log

Security for livekit 1.2.2

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.

Full provenance

All 7 files in this release have been uploaded with provenance metadata.

Select from 7 files

Attestation for livekit-1.2.2.tar.gz

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 Nov 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.2.2 This release

7 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page