WebRTC icon indicating copy to clipboard operation
WebRTC copied to clipboard

Cameras load, but then constantly reload while viewing

Open kspearrin opened this issue 2 years ago • 12 comments

  • Using version 3.1.0
  • All configs are similar to this
    type: custom:webrtc-camera
    entity: camera.front_door
    background: true
    muted: true
    
  • All 10 of my Amcrest cameras load (not having to disable backchannel anymore)
  • While viewing the camera feeds in HA cards with WebRTC, they continually reload every 3-10 seconds (shows loading2 while reloading). This is while just watching the screen and no interaction. Sometimes they don't load back after reloading and are just black and loading with MSE in corner. The ones that don't reload will sometimes reload again a few seconds later and work again. This all happens over and over again.
  • This doesn't happen every time, but most of the time it does.
  • While camera is not loaded (or reloaded), it does not show up in the go2rtc UI list. Once it loads back, it shows back in the go2rtc UI list
  • I didn't have this issue prior to upgrading to v3

kspearrin avatar Feb 20 '23 12:02 kspearrin

Do you have all 10 cameras on same page? What technology do you see on top right corner for all of them?

AlexxIT avatar Feb 20 '23 17:02 AlexxIT

Do you have all 10 cameras on same page? What technology do you see on top right corner for all of them?

I have a page with all 10 on one and other pages split up with 5 on each. It happens on all of them.

They have RTC in to top right after successfully loading. Sometimes they don't load back after doing a reload and are just black with a loading spinner with MSE in corner.

kspearrin avatar Feb 21 '23 01:02 kspearrin

If you send me your email, I can try to do a screen recording of it to send to you. I don't really want to post my streams publicly. Not sure if that would be helpful or not.

kspearrin avatar Feb 21 '23 01:02 kspearrin

For whatever reason, this evening the cameras won't even load with RTC anymore. All I get are MSE loaded streams that continue to repeat the same reload behavior as described before. I am not sure why they changed to only loading MSE now, but it appears to be even more unreliable than before. I am afraid I am going to need to revert back to v2.

kspearrin avatar Feb 22 '23 01:02 kspearrin

Are you sure v2 uses RTC? It is also can work over MSE. Are you doing your experiments inside the local network?

AlexxIT avatar Feb 22 '23 05:02 AlexxIT

I just reverted back to v2.3.1 and all cameras are working fine again with RTC. No more MSE or reloading.

image

Yes, I am in the local network on my desktop computer.

kspearrin avatar Feb 22 '23 13:02 kspearrin

If your stream has AAC audio - v3 will prefer MSE technology

AlexxIT avatar Feb 22 '23 13:02 AlexxIT

Hi i'm having the same issue i have all the streams in my home assistant they are always reloading around every 10 seconds but it seems to be random

gordnhoo avatar Apr 21 '24 08:04 gordnhoo

fixed it by adding this in home assistant mode: mse

gordnhoo avatar Apr 22 '24 19:04 gordnhoo