streamlit-webrtc
Real-time video and audio streams over the network, with Streamlit.
Example
You can try out the sample app using the following commands.
$ pip install streamlit-webrtc opencv-python
$ streamlit run https://raw.githubusercontent.com/whitphx/streamlit-webrtc-example/main/app.py
You can also try it out on Streamlit Sharing.
The deployment of this sample app is managed in this repository: https://github.com/whitphx/streamlit-webrtc-example/.
API
Currently there is no documentation about the interface. See the example app.py for the usage.
The API is not finalized yet and can be changed without backward compatiblity in the future releases until v1.0.
For users since versions <0.20
VideoTransformerBase
and its transform
method have been marked as deprecated in v0.20.0. Please use VideoProcessorBase#recv()
instead.
Note that the signature of the recv
method is different from the transform
in that the recv
has to return an instance of av.VideoFrame
or av.AudioFrame
. See the samples in app.py.