skillfed

streamlit-webrtc

Real-time video and audio processing on Streamlit

streamlit-webrtc v0.77.0 97.5K downloads/30d#13,148 on PyPI1,705
Permissive license MIT Active released

What it is and what it does

streamlit-webrtc bridges Streamlit and WebRTC to let you capture and process live video and audio streams directly in the browser. It exposes a single main component, `webrtc_streamer()`, which handles the peer connection setup, media negotiation, and frame delivery. You pass optional callbacks to intercept and transform video or audio frames using the PyAV library (av.VideoFrame, av.AudioFrame), then return the modified frames to the stream.

The package handles the complexity of WebRTC signaling and media transport so you can focus on the processing logic. Common patterns include object detection, audio filtering, style transfer, and speech-to-text. Callbacks execute in background threads independent of the main Streamlit script, so you must manage thread-safety and use locks when sharing state. The component includes built-in media toggle controls to let users mute camera or microphone without stopping the session.

Use it for:

  • Build a real-time video chat or conferencing app with minimal boilerplate.
  • Apply live computer vision (object detection, pose estimation) to camera input.
  • Process audio in real time for speech-to-text or audio filtering applications.
  • Create interactive video effects or style transfer demos that run in the browser.
  • Stream video from one peer to another with frame-level processing in between.
  • Prototype media-heavy Streamlit apps without managing WebRTC infrastructure yourself.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Adds real-time video and audio streaming over WebRTC to Streamlit apps, with support for frame-by-frame processing callbacks.

Yes. The package is actively maintained, has no known vulnerabilities, installs with low friction, and solves a specific problem (real-time media in Streamlit) that is otherwise difficult to implement. MIT licensing removes legal barriers. Suitable if you need browser-based video/audio capture and processing in a Streamlit app; not necessary if you only need static media or pre-recorded files.

Install

streamlit-webrtc on PyPI

pip

pip install streamlit-webrtc

uv

uv add streamlit-webrtc

poetry

poetry add streamlit-webrtc

Installing streamlit-webrtc

Before you install

Low install friction with a pure-Python wheel. Active maintenance with a recent release (7 days old) and steady repository activity. Requires Python 3.10 or later.

License in practice

MIT license permits commercial and private use with minimal restrictions; suitable for most projects.

Quickstart

pip install streamlit-webrtc

from streamlit_webrtc import webrtc_streamer
import av

def video_frame_callback(frame):
    img = frame.to_ndarray(format="bgr24")
    flipped = img[::-1,:,:]
    return av.VideoFrame.from_ndarray(flipped, format="bgr24")

webrtc_streamer(key="example", video_frame_callback=video_frame_callback)

Requires Python 3.10 or later. Browser must support WebRTC and grant camera/microphone permissions. Callbacks run in forked threads and cannot call Streamlit methods directly.

Verify before relying

  • Whether frame processing latency is acceptable for interactive real-time applications.
  • Browser compatibility matrix and any known platform-specific WebRTC limitations.
  • Performance characteristics with multiple concurrent streams or high-resolution video.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 5 — aioice, aiortc, av, packaging, streamlit
Maintenance actively maintained — 7 days since the last release
Last repo commit
First released
Downloads 97,508/month — #13,148 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: streamlit_webrtc-0.77.0-py3-none-any.whl

Tags

webrtc streaming streamlitreal-time video audio processingbrowser camera microphone accesslive video chat web appstreamlit media capturevideo frame callback processingpeer-to-peer video streaming
webrtcreal-time-mediastreamlit-component

More Dynamic Content packages