--- id: streamlit-webrtc version: "0.77.0" license: MIT license_treatment: permissive maintenance: active --- # streamlit-webrtc — Real-time video and audio processing on Streamlit License: permissive · Maintenance: active · Downloads: 97.5K/mo ## 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 above — 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 pip install streamlit-webrtc uv add streamlit-webrtc 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_current - Install friction: low - Maintenance: active - Downloads: 97.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags webrtc streaming streamlit, real-time video audio processing, browser camera microphone access, live video chat web app, streamlit media capture, video frame callback processing, peer-to-peer video streaming, webrtc, real-time-media, streamlit-component [View on SkillFed](https://skillfed.io/packages/streamlit-webrtc) · [View on PyPI](https://pypi.org/project/streamlit-webrtc/)