deepch / RTSPtoWebRTC

RTSP to WebRTC use Pion WebRTC

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Odd Issue with WebRTC in Home Assistant

tokenwizard opened this issue · comments

I have several RTSP Streams I use with the Generic Camera integration and Picture Entity cards to display them live. The major issue is a 10-15 second delay.

So I am looking into the WebRTC/RTSPtoWEBRTC functionality to alleviate this. I have an LXC container on the same LAN as HA running a separate instance of RTSPtoWEB via Docker that is working really well.

I installed the WebRTC and RTSPtoWebRTC Addons/Integrations into HA and pointed the latter to my separate instance of RTSPtoWEB. Then I swapped all my Picture Entity cards for Picture Glance ones, pointed to the same Generic Camera Entities.

On my desktop, every Dashboard/Panel I create with these new Picture Entity cards works amazingly well with little to no lag.

Great Stuff!

Here's where it gets odd. I have two Raspberry Pi connected to two monitors in the house. These Pis are also on the same LAN as HA and RTSPtoWEB. I have these configure to point to a specific Panel to display fullscreen that gives me a view of several camera feeds, weather radar, etc...

For whatever reason, the Camera Feeds on these two systems all show an error that says "unable to start track" and "codec is not supported by remote." The same Panel plays fine on my Desktop.

Is this codec reference related to the Raspberry Pis? I am running Firefox on my Desktop with no issues, and Firefox-ESR on the Pis (as it is the one that is included in the RPi OS Repo).

Has anyone else had any experience with this? By default, what codec is used for this combo?

It also seems this integration/addon affects Picture Entity card, too, rather than just Picture Glance ones?
Because I left a copy of the Panel intact that still uses Picture Entity cards and they, too, are showing that same WebRTC-related error and not working like they have for the past two months.

Disabling the two Integrations makes the Picture Entity Cards functional again on the Pis.

FYI, I resolved this by using Generic Camera entities in HA and pointing them directly to the m3u8 stream URLs for each camera from the RTSPtoWEB server instance I am running outside of HA.

The Pis seem to be able to handle the streams this way.

This repo really isn't set up to support home assistant. Perhaps I might suggest tou should discuss in the home assistant community forums unless you have a more specific issue with the server, which may need to be more specific.