{"id":24664,"library":"streamlit-webrtc","title":"Streamlit WebRTC","description":"Real-time video and audio processing for Streamlit apps via WebRTC. Current version 0.64.6, requires Python >=3.10. Active development with frequent releases.","status":"active","version":"0.64.6","language":"python","source_language":"en","source_url":"https://github.com/whitphx/streamlit-webrtc","tags":["streamlit","webrtc","video","audio","real-time"],"install":[{"cmd":"pip install streamlit-webrtc","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core dependency; the component is designed to run inside a Streamlit app","package":"streamlit","optional":false},{"reason":"Audio/video processing (required for media transformations)","package":"av","optional":true}],"imports":[{"note":"The class is a function, not a class; wrong casing leads to ImportError","wrong":"from streamlit_webrtc import WebRtcStreamer","symbol":"webrtc_streamer","correct":"from streamlit_webrtc import webrtc_streamer"},{"note":"Used for accessing state and video/audio receivers","wrong":null,"symbol":"WebRtcStreamerContext","correct":"from streamlit_webrtc import WebRtcStreamerContext"},{"note":"Base class for video transformations; use with webrtc_streamer","wrong":null,"symbol":"VideoTransformerBase","correct":"from streamlit_webrtc import VideoTransformerBase"}],"quickstart":{"code":"import streamlit as st\nfrom streamlit_webrtc import webrtc_streamer, VideoTransformerBase\n\nclass MyTransformer(VideoTransformerBase):\n    def transform(self, frame):\n        return frame\n\nwebrtc_streamer(key=\"example\", video_transformer_factory=MyTransformer)","lang":"python","description":"Minimal app that displays a webcam feed with a no-op video transformer."},"warnings":[{"fix":"Ensure `video_transformer_factory` returns a synchronous transformer object; do not use async/await in the factory.","message":"In v0.50.0, the async-to-sync transformation changed; `video_transformer_factory` must return a transformer instance, not a coroutine. Older patterns using async functions break.","severity":"breaking","affected_versions":">=0.50.0"},{"fix":"Use `from streamlit_webrtc import webrtc_streamer` (lowercase).","message":"The `webrtc_streamer` function is not a class; calling `WebRtcStreamer(...)` (capital W) raises ImportError.","severity":"gotcha","affected_versions":"all"},{"fix":"Use HTTPS in production or run locally via `streamlit run` (which uses localhost).","message":"Streamlit WebRTC only works over HTTPS (or localhost). Deploying over HTTP results in `Failed to access media` errors.","severity":"gotcha","affected_versions":"all"},{"fix":"Replace `audio_frame_callback` with `audio_transformer_factory` that returns an audio transformer.","message":"The `audio_frame_callback` parameter is deprecated since v0.50.0 in favor of `audio_transformer_factory`.","severity":"deprecated","affected_versions":">=0.50.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use `from streamlit_webrtc import webrtc_streamer` (all lowercase).","cause":"Using wrong case (WebRtcStreamer instead of webrtc_streamer) or wrong import path.","error":"ImportError: cannot import name 'WebRtcStreamer' from 'streamlit_webrtc'"},{"fix":"Ensure `video_transformer_factory` returns a valid transformer instance (e.g., MyTransformer()).","cause":"`video_transformer_factory` returned None, or no factory was provided.","error":"TypeError: 'NoneType' object is not callable"},{"fix":"Run on localhost (default with streamlit run) or deploy with HTTPS.","cause":"Browser requires HTTPS (or localhost) for getUserMedia.","error":"RuntimeError: Could not obtain user media"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}