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

Issue about Video Recording

Open Lejia-Zhang17 opened this issue 4 years ago • 3 comments

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!

Lejia-Zhang17 avatar Apr 23 '21 09:04 Lejia-Zhang17

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

  • from 172.17.0.82:58866 to 172.17.0.82:57933
  • from 192.168.43.10:57659 to 172.17.0.82:57933
  • from 172.17.0.82:58866 to 192.168.43.10:59518
  • from 192.168.43.10:57659 to 192.168.43.10:59518

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

whitphx avatar Apr 24 '21 09:04 whitphx

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!

Lejia-Zhang17 avatar Apr 25 '21 14:04 Lejia-Zhang17

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

  • What the IP addresses shown in the log (172.17.0.82, 192.168.43.10) means in your network environment, e.g. localhost?
  • What hosts are you running the Streamlit app and the web browsers on? For example, both on localhost?
  • What kind of network topology does your environment have? For example, your web browser and the app are running inside the same LAN, or the same host?.

whitphx avatar May 01 '21 16:05 whitphx