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

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.0
File Size Uploaded Provenance Actions
livekit-1.2.0.tar.gz 402.6 kB With provenance Details for livekit-1.2.0.tar.gz

Built distributions (wheels)

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

Total release size: 53.8 MB

Release files / livekit-1.2.0.tar.gz

Download URL livekit-1.2.0.tar.gz
Size 402.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a7ac564de20c54d532ff59ebb92d0018d088c96dc36a81d0e02be8b9efa7584c
BLAKE2b-256 checksum
How to use checksums
b52d18619af995f2532351c36a86920f58a06c76419e2b882e29201803a0e36b
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 27, 2026.

Transparency log

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

Download URL livekit-1.2.0-py3-none-win_amd64.whl
Size 11.0 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
34a44cd884badb596c01d3ba99ba2d67de3d84d253bc62a1c07b4739f6b68c32
BLAKE2b-256 checksum
How to use checksums
ed10abc4e06a29b3ae2b845fcc243d52da0adcd7b387c881ca5ab3552f60c300
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 27, 2026.

Transparency log

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

Download URL livekit-1.2.0-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
9eae2fbf857e0af2516eb03f5285eb5edf0ea0b1aa238268291ccb1a7e11d4d4
BLAKE2b-256 checksum
How to use checksums
8583da52537a2f7147e931a495f72a77e873be7350681c5fea3509f5b42f5342
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 27, 2026.

Transparency log

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

Download URL livekit-1.2.0-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
d6279a25ca7b25667908dc43fbc69374f84fa63b7fc857639483a7a3a3850070
BLAKE2b-256 checksum
How to use checksums
a8fa5e1293fb05e55f84c903c1daad8726680e69e33df44a179bedbf6a965735
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 27, 2026.

Transparency log

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

Download URL livekit-1.2.0-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
08774b3ffe04491515e7ae3bf920051a0a1d40bf7e2f74a499cf9ef444c42e1f
BLAKE2b-256 checksum
How to use checksums
f08552eb4acacb07b3c18597e081600afbcf631a81399371f3ec854b2bf25e76
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 27, 2026.

Transparency log

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

Download URL livekit-1.2.0-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
1dee2aa01f01951c0798b713d40331dd958e5166196d2d8d1b85e6ce900b0a23
BLAKE2b-256 checksum
How to use checksums
a825fd82622d8486fc607ea69fe298de61dce7556f4dff999c488c1594ba7af5
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 27, 2026.

Transparency log

Security for livekit 1.2.0

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 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for livekit-1.2.0.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 Oct 27, 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.0 This release

6 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