New Component: streamlit-webrtc, a new way to deal with real-time media streams

@whitphx

Hi, I get the following error in streamlit. Does anyone have any clue what this is about?:

Your app is having trouble loading the streamlit_webrtc.component.webrtc_streamer component.

(The app is attempting to load the component from ****, and hasn’t received its "streamlit

" message.)

  • If this is a development build, have you started the dev server?
  • If this is a release build, have you compiled the frontend?

For more troubleshooting help, please see the Streamlit Component docs or visit our forums.

hi,did u solve this ? i encounter the same.

Hi developer, i really love your streamlit work, does any example related to real-time sound classification?

Hi Dev, im testing this in my local network and would like to ask. if i am not specifying a “rtc_configuration” in webrtc_streamer, does it mean that the the streamer is directly sending data over my network? I’am not connecting to a defined stun server right?

Hi everyone,

I have been using WebRTC apps hosted on the Community Cloud with Twilio TURN Server for several months now, and it has worked pretty well. However, since a few days ago, the web streaming has been extremely slow and functions poorly. I checked the sample app and observed the same problem.

Has anyone experienced the same problem and may know a solution?

yup. same
i was able to deploy the app successfully and it works for some time and later it is not working. camera is not opening

hello, thank you @whitphx for developing the streamlit-webrtc package!
I’m new to using streamlit and streamlit-webrtc.

I wanted to develop an object detection-ish web app but it seems to not work. The camera doesnt open and its keeps loading.
Note: Python=3.11.8, streamlit=1.33 and streamlit-webrtc=0.47.6

Code:

import streamlit as st
from streamlit_webrtc import webrtc_streamer
import numpy as np

flip = st.checkbox("Flip")

def video_frame_callback(frame):
    img = frame.to_ndarray(format="bgr24")

    if flip:
        img = np.flipud(img)

    st.image(img, channels="BGR")

webrtc_streamer(key="example", video_frame_callback=video_frame_callback,
                media_stream_constraints={"video": True, "audio": True})

Error in logs:

File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 719, in _fatal_error
    self._loop.call_exception_handler({
AttributeError: 'NoneType' object has no attribute 'call_exception_handler'

output:

Thanks!