Webcam not working when deploying to Streamlit Cloud (streamlit-webrtc)

Hi all,
I am trying to make an old app working again - the app uses webcam to capture some images and make predictions on them. I am using streamlit-webrtc for this, and the app was working in the past with Streamlit Cloud. Now, when I try to start the video streaming it just loads for a while and then stops trying, and see the below in the logs.
url to demo: https://sign-app-ykkvfwl34ol.streamlit.app/
source code: GitHub - evaenglert/sign-app

2023-06-29 08:17:15.929 Track video received
2023-06-29 08:17:15.929 Set <aiortc.rtcrtpreceiver.RemoteStreamTrack object at 0x7f1b438f8670> as an input video track with video_processor <class 'streamlit_webrtc.process.AsyncVideoProcessTrack'>
2023-06-29 08:17:15.929 Add a track <streamlit_webrtc.process.AsyncVideoProcessTrack object at 0x7f1b438fa3a0> of kind video to <aiortc.rtcpeerconnection.RTCPeerConnection object at 0x7f1b43d4acd0>
2023-06-29 08:17:15.949 Connection(2) Check CandidatePair(('10.12.17.57', 57485) -> ('192.168.1.140', 59808)) State.FROZEN -> State.WAITING
2023-06-29 08:17:15.949 Connection(2) Check CandidatePair(('10.12.17.57', 57485) -> ('10.5.0.2', 53790)) State.FROZEN -> State.WAITING
2023-06-29 08:17:15.949 ICE connection state is checking
2023-06-29 08:17:15.950 Connection(2) Check CandidatePair(('10.12.17.57', 57485) -> ('192.168.1.140', 59808)) State.WAITING -> State.IN_PROGRESS
2023-06-29 08:17:16.067 Connection(2) Check CandidatePair(('10.12.17.57', 57485) -> ('10.5.0.2', 53790)) State.WAITING -> State.IN_PROGRESS
2023-06-29 08:17:16.195 Connection(2) Check CandidatePair(('10.12.17.57', 57485) -> ('31.14.250.127', 56300)) State.FROZEN -> State.IN_PROGRESS
2023-06-29 08:17:16.217 Connection(2) Check CandidatePair(('10.12.17.57', 57485) -> ('185.219.143.26', 53790)) State.FROZEN -> State.IN_PROGRESS
2023-06-29 08:17:32.873 ICE connection state is closed

Hey @franciska ,

I don’t think your code is upto date with the latest Streamlit documentation. Please check below: st.camera_input - Streamlit Docs

I would also advise checking browser permissions for camera access.

Hope this helps!

@franciska it looks like it is rebooted for me!

But why streamlit is not handling large object detection models. I have build an rela time poth hole object detection mode. The side of my model is 135MB. When in using streamlit webcam option, it’s not working. Shockingly, its working for small models. Is there any alternative?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.