whitphx / streamlit-webrtc

Real-time video and audio streams over the network, with Streamlit.
https://discuss.streamlit.io/t/new-component-streamlit-webrtc-a-new-way-to-deal-with-real-time-media-streams/8669
MIT License
1.27k stars 176 forks source link

Issue about Video Recording #151

Open Lejia-Zhang17 opened 3 years ago

Lejia-Zhang17 commented 3 years ago

Hi @whitphx!
I met an issue when I call streamlit webrtc_streamer by using webrtc_streamer(key="example").

The device that I used is MacBook Pro with macOS Catalina. The browser that I have tested are Chrome, Safari and Firefox. After I clicked the "start" button, the webcamera would start with green light, but there is no video displayed on the webpage and the green light would disappear in second. The the message shown in the terminal like this:

2021-04-23 17:08:11.023 Track audio received 2021-04-23 17:08:11.023 Track video received 2021-04-23 17:08:11.566 Connection(0) Check CandidatePair(('172.17.0.82', 58866) -> ('172.17.0.82', 57933)) State.FROZEN -> State.WAITING 2021-04-23 17:08:11.567 Connection(0) Check CandidatePair(('192.168.43.10', 57659) -> ('172.17.0.82', 57933)) State.FROZEN -> State.WAITING 2021-04-23 17:08:11.568 Connection(0) Check CandidatePair(('172.17.0.82', 58866) -> ('192.168.43.10', 59518)) State.FROZEN -> State.WAITING 2021-04-23 17:08:11.569 ICE connection state is checking 2021-04-23 17:08:11.569 Connection(0) Check CandidatePair(('172.17.0.82', 58866) -> ('172.17.0.82', 57933)) State.WAITING -> State.IN_PROGRESS 2021-04-23 17:08:11.590 Connection(0) Check CandidatePair(('192.168.43.10', 57659) -> ('172.17.0.82', 57933)) State.WAITING -> State.IN_PROGRESS 2021-04-23 17:08:11.613 Connection(0) Check CandidatePair(('172.17.0.82', 58866) -> ('192.168.43.10', 59518)) State.WAITING -> State.IN_PROGRESS 2021-04-23 17:08:11.636 Connection(0) Check CandidatePair(('192.168.43.10', 57659) -> ('192.168.43.10', 59518)) State.FROZEN -> State.IN_PROGRESS 2021-04-23 17:09:15.083 Connection(0) Check CandidatePair(('172.17.0.82', 58866) -> ('172.17.0.82', 57933)) State.IN_PROGRESS -> State.FAILED 2021-04-23 17:09:15.103 Connection(0) Check CandidatePair(('192.168.43.10', 57659) -> ('172.17.0.82', 57933)) State.IN_PROGRESS -> State.FAILED 2021-04-23 17:09:15.121 Connection(0) Check CandidatePair(('172.17.0.82', 58866) -> ('192.168.43.10', 59518)) State.IN_PROGRESS -> State.FAILED 2021-04-23 17:09:15.153 Connection(0) Check CandidatePair(('192.168.43.10', 57659) -> ('192.168.43.10', 59518)) State.IN_PROGRESS -> State.FAILED 2021-04-23 17:09:15.153 Connection(0) ICE failed 2021-04-23 17:09:15.161 ICE connection state is failed 2021-04-23 17:09:15.161 ICE connection state is closed

Could you offer some help on this problem? Many thanks!

whitphx commented 3 years ago

There seems to be some network problems. The log means it failed to establish connections

Are you using firewall software which blocks these connections, or running the app behind network proxies or inside docker containers without host-networking mode?

Lejia-Zhang17 commented 3 years ago

Thanks for your reply! I have checked that I didn't use the firewall software:

Screen Shot 2021-04-25 at 10 22 23 PM

I ran the app in my virtual Python environment (Python 3.7) and start run the streamlit through PyCharm terminal. And current proxies setting is like this:

Screen Shot 2021-04-25 at 10 23 10 PM

I also used VPN, but the video recording function doesn't work even if the VPN shut off.

Screen Shot 2021-04-25 at 10 28 17 PM

I would appreciate if you could provide me some suggestions on how to adjust my networking setting. Thanks!

whitphx commented 3 years ago

mmm, I still do not have solutions, but let me ask some things;