streamlit-webrtc icon indicating copy to clipboard operation
streamlit-webrtc copied to clipboard

streamlit webrtc not working

Open utkars3 opened this issue 1 year ago • 12 comments

it keeps loading and showing a black screen.i tried with different version too.even when i checked the official release https://webrtc.streamlit.app/ even here also the same problem exists.

https://github.com/user-attachments/assets/8bfab821-b751-49f4-9d4e-3039e4976bf6

I am not able to understand how to fix the issue

utkars3 avatar Nov 08 '24 19:11 utkars3

Hi thanks for the report. Looks like there has been some changes on Streamlit Cloud. Please try https://huggingface.co/spaces/whitphx/streamlit-webrtc-example instead which is deployed on Hugging Face Spaces until we can find the fix.

whitphx avatar Nov 26 '24 12:11 whitphx

Hi thanks for the report. Looks like there has been some changes on Streamlit Cloud. Please try https://huggingface.co/spaces/whitphx/streamlit-webrtc-example instead which is deployed on Hugging Face Spaces until we can find the fix.

Can I still use this library for my project in my localhost ? I tried to run example code but it doesn't work.

CristalViet avatar Nov 26 '24 20:11 CristalViet

Yes, it should work. Setting up the STUN server config may also be needed even in localhost. If you are using VPN, try disabling it.

whitphx avatar Nov 27 '24 07:11 whitphx

Can you fix the issue of webcam not opening in streamlit webrtc as it is still not functional and i need it for deployment

Pratyush061 avatar Dec 03 '24 17:12 Pratyush061

having same issue.

choigawoon avatar Dec 08 '24 15:12 choigawoon

Having the same issue.

AlejandroMoc avatar Dec 13 '24 00:12 AlejandroMoc

having the same issue

PakmanGames avatar Jan 12 '25 01:01 PakmanGames

having the same issue

difoxy2 avatar Jan 12 '25 03:01 difoxy2

The user identified an issue where streamlit-webrtc does not function properly with newer versions of Streamlit. They confirmed that the issue is resolved by downgrading the Streamlit package to version 1.38.0 while keeping streamlit-webrtc at its latest version. The problem appears to occur with Streamlit versions 1.39.0 and above.

rezimitpo avatar Jan 12 '25 09:01 rezimitpo

I can not get it to run even with streamlit package downgraded to v1.38.0. Issue persists

schachem avatar Feb 06 '25 17:02 schachem

Hi, sorry for inconvenience and now streamlit-webrtc>=0.48.1 can be used with streamlit>=1.39.0. Plz try it.

whitphx avatar Mar 12 '25 03:03 whitphx

Hi, I am using Python 3.12.7 on Windows 10 Home, with Streamlit == 1.39.0 (as mentioned above) and Streamlit_WebRTC == 0.53.7, and when I click on "Start", Chrome (Version 134.0.6998.118 - 64Bits) recognizes the mic is being used, the button value changes to "Stop", but when I debug checking if the WebRTC is playing, I get a failed message. Even using Streamlit==1.43.2. Below I attached the snippet code I'm using to test.

    webrtx_ctx = webrtc_streamer(
        key='audio_receiver',
        mode=WebRtcMode.SENDONLY,
        audio_receiver_size=1024,
        media_stream_constraints={'video': False, 'audio':True},
        rtc_configuration={
                "iceServers": [{"urls": ["stun:stun.l.google.com:19302"]}]            
            }
    )

    if not webrtx_ctx.state.playing:
        print("FAILED")

Since no audio is being captured, I can't move forward with the audio data to work with it. Plus: I am using it for real-time audio-capture and transcription.

Any ideas? Thanks!

ViniciusBranco avatar Mar 25 '25 15:03 ViniciusBranco