Skip to content

Experimenting streamlit-webrtc using Google Colab and Ngrok #335

@trisgelar

Description

@trisgelar

Hi, anyone have been experimenting streamlit-webrtc component with Google Colabs and Ngrok, i need this setup because google colab have free gpu to serve my model.

I have an ICE connection state is failed after running app.py example,

https://gist.github.com/trisgelar/86968b75a3ff84f1425c1ccee6ad0415

Thanks.

You can now view your Streamlit app in your browser.

Network URL: http://172.28.0.2:8501
External URL: http://34.125.122.87:8501

2021-07-19 15:16:47.944 Restore the component value (key=object-detection)
2021-07-19 15:17:45.056 No worker exists though the offer SDP is set. Create a new worker (key="object-detection").
2021-07-19 15:17:45.073 _webrtc_thread_impl starts
2021-07-19 15:17:46.110 Connection(0) Remote candidate "47ce6f98-7967-4bee-af8b-3fba9e547390.local" could not be resolved
2021-07-19 15:17:46.110 Track audio received
2021-07-19 15:17:46.110 Add a track <aiortc.rtcrtpreceiver.RemoteStreamTrack object at 0x7fd7b9e60b10> of kind audio to <aiortc.rtcpeerconnection.RTCPeerConnection object at 0x7fd7d5325cd0>
2021-07-19 15:17:46.111 Track video received
2021-07-19 15:17:46.111 Set <aiortc.rtcrtpreceiver.RemoteStreamTrack object at 0x7fd7b8d32fd0> as an input video track with video_processor <class 'streamlit_webrtc.process.AsyncVideoProcessTrack'>
2021-07-19 15:17:46.111 Add a track <streamlit_webrtc.process.AsyncVideoProcessTrack object at 0x7fd7b8d37b90> of kind video to <aiortc.rtcpeerconnection.RTCPeerConnection object at 0x7fd7d5325cd0>
2021-07-19 15:17:46.149 Connection(0) Check CandidatePair(('172.28.0.2', 49728) -> ('120.89.90.198', 33875)) State.FROZEN -> State.WAITING
2021-07-19 15:17:46.197 ICE connection state is checking
2021-07-19 15:17:46.344 Connection(0) Check CandidatePair(('172.28.0.2', 49728) -> ('120.89.90.198', 33875)) State.WAITING -> State.IN_PROGRESS
2021-07-19 15:18:13.134 Unset the worker because the frontend state is neither playing nor signalling (key="object-detection").
2021-07-19 15:18:17.852 No worker exists though the offer SDP is set. Create a new worker (key="object-detection").
2021-07-19 15:18:17.853 _webrtc_thread_impl starts
2021-07-19 15:18:17.888 Track audio received
2021-07-19 15:18:17.888 Add a track <aiortc.rtcrtpreceiver.RemoteStreamTrack object at 0x7fd7d531a510> of kind audio to <aiortc.rtcpeerconnection.RTCPeerConnection object at 0x7fd7d8149a10>
2021-07-19 15:18:17.888 Track video received
2021-07-19 15:18:17.888 Set <aiortc.rtcrtpreceiver.RemoteStreamTrack object at 0x7fd7b8c0e410> as an input video track with video_processor <class 'streamlit_webrtc.process.AsyncVideoProcessTrack'>
2021-07-19 15:18:17.889 Add a track <streamlit_webrtc.process.AsyncVideoProcessTrack object at 0x7fd7b8c03090> of kind video to <aiortc.rtcpeerconnection.RTCPeerConnection object at 0x7fd7d8149a10>
2021-07-19 15:18:17.972 Connection(2) Check CandidatePair(('172.28.0.2', 53740) -> ('192.168.0.106', 39647)) State.FROZEN -> State.WAITING
2021-07-19 15:18:17.973 Connection(2) Check CandidatePair(('172.28.0.2', 53740) -> ('120.89.90.198', 39647)) State.FROZEN -> State.WAITING
2021-07-19 15:18:18.112 ICE connection state is checking
2021-07-19 15:18:18.112 Connection(2) Check CandidatePair(('172.28.0.2', 53740) -> ('192.168.0.106', 39647)) State.WAITING -> State.IN_PROGRESS
2021-07-19 15:18:18.189 Connection(2) Check CandidatePair(('172.28.0.2', 53740) -> ('120.89.90.198', 39647)) State.WAITING -> State.IN_PROGRESS
2021-07-19 15:18:49.853 Connection(0) Check CandidatePair(('172.28.0.2', 49728) -> ('120.89.90.198', 33875)) State.IN_PROGRESS -> State.FAILED
2021-07-19 15:18:49.853 Connection(0) ICE failed
2021-07-19 15:18:49.860 ICE connection state is failed
2021-07-19 15:18:49.860 ICE connection state is closed
2021-07-19 15:19:21.619 Connection(2) Check CandidatePair(('172.28.0.2', 53740) -> ('192.168.0.106', 39647)) State.IN_PROGRESS -> State.FAILED
2021-07-19 15:19:21.705 Connection(2) Check CandidatePair(('172.28.0.2', 53740) -> ('120.89.90.198', 39647)) State.IN_PROGRESS -> State.FAILED
2021-07-19 15:19:21.706 Connection(2) ICE failed
2021-07-19 15:19:21.720 ICE connection state is failed
2021-07-19 15:19:21.721 ICE connection state is closed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions