Deploy in streamlit cloud not working with streamlit-webrtc

Hi every one I’m trying to deploy my app in streamlit cloud, my code detect the objects with the camera when I deploy it but is not showing me the results and the tracker in the webcam frame I’ll show a screenshow below, but my main problem in in the helper.py file with the def play_webcam(): so I’m not sure what should I do. Please help this is the error message in the terminal:

2023-08-14 03:15:30.091 Thread 'async_media_processor_10': missing ScriptRunContext

In the image we can see the message that indicates that detects the object:

0: 608x800 1 loveyou, 267.2ms
Speed: 18.9ms preprocess, 267.2ms inference, 1.0ms postprocess per image at shape (1, 3, 608, 800)

Hi @Eduardo_Padron :wave:

Would it be possible to send us the full error log trace for your issue?

@whitphx has also created an excellent documentation for his Streamlit-webrtc component. You may want to check it out to see if you can diagnose your issue from there. Here’s the link: GitHub - whitphx/streamlit-webrtc: Real-time video and audio streams over the network, with Streamlit.

If that doesn’t solve your issue, please send us that log trace and we will review it :slight_smile:

Best wishes,
Charly

1 Like

Hi @Charly_Wargnier the full error when I click start in the webcam option of my app is this one:
Note: the XXX i putted them because there is a ip adress and I’m not sure if is my IP. But the app detects the objects just the problems is that is not displaying the labels and frames in the camera window.

2023-08-16 21:04:54.886 The argument video_transformer_factory is deprecated. Use video_processor_factory instead.

2023-08-16 21:04:55.752 The argument video_transformer_factory is deprecated. Use video_processor_factory instead.

2023-08-16 21:04:59.902 The argument video_transformer_factory is deprecated. Use video_processor_factory instead.

2023-08-16 21:05:00.624 Track video received

2023-08-16 21:05:00.624 Set <aiortc.rtcrtpreceiver.RemoteStreamTrack object at 0x7fbc03ef9780> as an input video track with video_processor <class 'streamlit_webrtc.process.AsyncVideoProcessTrack'>

2023-08-16 21:05:00.625 Add a track <streamlit_webrtc.process.AsyncVideoProcessTrack object at 0x7fbc03efa080> of kind video to <aiortc.rtcpeerconnection.RTCPeerConnection object at 0x7fbc03edf970>

2023-08-16 21:05:00.647 Connection(0) Check CandidatePair(('XX.XX.XX.XXX', XXXXX) -> ('XXX.XXX.X.XX', XXXXX)) State.FROZEN -> State.WAITING

2023-08-16 21:05:00.647 Connection(0) Check CandidatePair(('XX.XX.XX.XXX', XXXXX) -> ('XXX.XXX.XXX.XX', XXXXX)) State.FROZEN -> State.WAITING

2023-08-16 21:05:00.647 ICE connection state is checking

2023-08-16 21:05:00.647 Connection(0) Check CandidatePair(('XX.XX.XX.XXX', XXXXX) -> ('XXX.XXX.X.XX', XXXXX)) State.WAITING -> State.IN_PROGRESS

2023-08-16 21:05:00.921 The argument video_transformer_factory is deprecated. Use video_processor_factory instead.

2023-08-16 21:05:01.446 Connection(0) Check CandidatePair(('XX.XX.XX.XXX', XXXXX) -> ('XXX.XXX.XXX.XX', XXXXX)) State.WAITING -> State.IN_PROGRESS

2023-08-16 21:05:01.982 The argument video_transformer_factory is deprecated. Use video_processor_factory instead.

2023-08-16 21:05:02.281 Connection(0) Check CandidatePair(('xx.xx.xx.xxx', XXXXX) -> ('xxx.xxx.xxx.xx', xxxxx)) State.IN_PROGRESS -> State.SUCCEEDED

2023-08-16 21:05:02.281 Connection(0) ICE completed

2023-08-16 21:05:02.282 ICE connection state is completed


0: 608x800 (no detections), 186.8ms

Speed: 3.6ms preprocess, 186.8ms inference, 0.5ms postprocess per image at shape (1, 3, 608, 800)

2023-08-16 21:05:04.654 Thread 'async_media_processor_0': missing ReportContext

2023-08-16 21:05:04.655 Thread 'async_media_processor_0': missing ReportContext

2023-08-16 21:05:04.666 Thread 'async_media_processor_0': missing ReportContext

2023-08-16 21:05:04.666 Thread 'async_media_processor_0': missing ReportContext

2023-08-16 21:05:04.666 Thread 'async_media_processor_0': missing ReportContext


0: 608x800 (no detections), 344.5ms

Thanks @Eduardo_Padron

You have a warning that states the video_transformer_factory argument is deprecated, and you should use video_processor_factory instead.

You may want to update your code to reflect this change to avoid potential problems. Also, make sure you are using the latest version.

I hope this resolves your problem. If not, please let us know, and we will take another look :slight_smile:

Charly

1 Like

Hi @Charly_Wargnier you are really kind, I’m still having problems this is the link of the full code Maybe I’m lost in something is my first time with webrtc in streamlit. I did the change and still not showing the frames now appears this:

2023-08-17 18:23:19.372 INFO    matplotlib.font_manager: generated new fontManager




2023-08-17 18:31:07.039 Track video received

2023-08-17 18:31:07.040 Set <aiortc.rtcrtpreceiver.RemoteStreamTrack object at 0x7f586d9f9720> as an input video track with video_processor <class 'streamlit_webrtc.process.AsyncVideoProcessTrack'>

2023-08-17 18:31:07.040 Add a track <streamlit_webrtc.process.AsyncVideoProcessTrack object at 0x7f586d9f9e70> of kind video to <aiortc.rtcpeerconnection.RTCPeerConnection object at 0x7f57a5a52f80>

2023-08-17 18:31:07.060 Connection(0) Check CandidatePair(('XX.XX.XX.XXX', XXXXX) -> ('XXX.XXX.X.XX', XXXXX)) State.FROZEN -> State.WAITING

2023-08-17 18:31:07.060 Connection(0) Check CandidatePair(('XX.XX.XX.XXX', XXXXX) -> ('XXX.XXX.XXX.XX', XXXXX)) State.FROZEN -> State.WAITING

2023-08-17 18:31:07.061 ICE connection state is checking

2023-08-17 18:31:07.061 Connection(0) Check CandidatePair(('XX.XX.XX.XXX', XXXXX) -> ('XXX.XXX.X.XX', XXXXX)) State.WAITING -> State.IN_PROGRESS

2023-08-17 18:31:07.882 Connection(0) Check CandidatePair(('XX.XX.XX.XXX', XXXXX) -> ('XXX.XXX.XXX.XX', XXXXX)) State.WAITING -> State.IN_PROGRESS

2023-08-17 18:31:08.514 Connection(0) Check CandidatePair(('XX.XX.XX.XXX', XXXXX) -> ('XXX.XXX.XXX.XXX', XXXXX)) State.IN_PROGRESS -> State.SUCCEEDED

2023-08-17 18:31:08.515 Connection(0) ICE completed

2023-08-17 18:31:08.530 ICE connection state is completed


0: 608x800 (no detections), 179.3ms

Speed: 11.6ms preprocess, 179.3ms inference, 1.2ms postprocess per image at shape (1, 3, 608, 800)

2023-08-17 18:31:11.354 Thread 'async_media_processor_0': missing ReportContext

2023-08-17 18:31:11.355 Thread 'async_media_processor_0': missing ReportContext

2023-08-17 18:31:11.382 Thread 'async_media_processor_0': missing ReportContext

2023-08-17 18:31:11.383 Thread 'async_media_processor_0': missing ReportContext

2023-08-17 18:31:11.383 Thread 'async_media_processor_0': missing ReportContext


0: 608x800 1 livelong, 619.2ms

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