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

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.1.21
File Size Uploaded
livekit-1.1.21.tar.gz 400.3 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for livekit 1.1.21
File
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 log

Release 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 log

Release 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 log

Release 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 log

Release 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 log

Release 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

Release history Release notifications | RSS feed

This release

1.1.21 This release

6 release files

1.1.20

6 release files

1.1.19

6 release files

1.1.16

6 release files

1.1.15

6 release files

1.1.14

6 release files

1.1.13

6 release files

1.1.12

6 release files

1.1.11

6 release files

1.1.9

6 release files

1.1.8

6 release files

1.1.7

6 release files

1.1.6

6 release files

1.1.5

6 release files

1.1.4

6 release files

1.1.3

6 release files

1.1.2

6 release files

1.1.1

6 release files

1.1.0

6 release files

1.0.25

6 release files

1.0.24

6 release files

1.0.23

6 release files

1.0.22

6 release files

1.0.21

6 release files

1.0.19

6 release files

1.0.17

6 release files

1.0.13

6 release files

1.0.12

6 release files

1.0.11

6 release files

1.0.10

6 release files

1.0.9

6 release files

1.0.8

6 release files

1.0.7

6 release files

1.0.6

6 release files

1.0.5

6 release files

1.0.4

6 release files

1.0.3

6 release files

1.0.2

6 release files

1.0.1

6 release files

1.0.0

6 release files

0.22.0

6 release files

0.20.3

6 release files

0.20.2

6 release files

0.20.1

6 release files

0.18.3

6 release files

0.18.1

6 release files

0.18.0

6 release files

0.17.6

6 release files

0.17.5

6 release files

0.17.1

6 release files

0.17.0

6 release files

0.16.4

6 release files

0.16.3

6 release files

0.16.2

6 release files

0.14.0

6 release files

0.13.1

6 release files

0.13.0

6 release files

0.12.1

6 release files

0.12.0

6 release files

0.11.0

6 release files

0.10.0

6 release files

0.9.2

6 release files

0.9.1

6 release files

0.9.0

6 release files

0.8.0

6 release files

0.7.1

6 release files

0.7.0

5 release files

0.6.0

6 release files

0.5.0

6 release files

0.4.6

6 release files

0.4.5

6 release files

0.4.3

6 release files

0.4.2

6 release files

0.4.1

6 release files

0.4.0

6 release files

0.3.3

6 release files

0.3.2

6 release files

0.3.1

6 release files

0.2.5

6 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.0

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.1

1 release file

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