Realtime camera streaming without any delay - WebRTC

Yes I have a VPN set-up on my Synology NAS to connect to my home network. The thing is, if you have an alert from your alarm system, you don’t wantto spend 60 seconds getting the VPN up and running to be able to watch your camera stream :wink:
In that case it’s much faster to open the Synology camera app.
My end goal is the following:
I get a notification from home assistant to my phone with a screenshot from the camera nearest to where the alarm deteced an issue. I want to be able to click that notifcation and that it takes me to the RTSP2WebRTC page so that I can quickly get a livestream.
Ideally it would be possible to have a link to that specific camera. I tried this by putting the following in the notification but that didn’t work:
So for now I just link to /a889bffc_rtsp2webrtc and have to click on the right camera.
Ideally it would be posible to integrate it in lovelace as @scstraus suggested.

Tried 4 different cameras that I know should work. All are H264 and work fine with other apps. All I get is a spinning circle and a couple of cryptic messages:
“add video transceiver”, “checking” and “1 track is delivered”

Mine says all of these things below the video stream, but there is one more that says “connected” also. Maybe double check username/password for a typo??
I have one Dauha cam and one Hikvision cam working with this.

Hmm, yeah I never get a connected message. I can copy/paste the URL I’m using into VLC and it works fine so I know the syntax is correct along with username/pw. I’ll try a couple other cameras though I have.

@quizzical you need to open UDP ports as it said in addon readme

@mattbrad2 some users has problem with double // in url after host name. Need to remove it.

Not sure what you mean. rtsp:// has to be in the URL or it won’t even save. It wouldn’t be a valid URL without double //

url: 'rtsp://user:[email protected]:554/cam/realmonitor?channel=1&subtype=0'

EDIT: It worked briefly but then stopped when I changed tabs. Now were back to spinning circles again.

Thank you,
I confirm that it works externally now that I have set the port forwarding.
I misinterpreted the readme as if this was necessary if I wanted to connect a camera that was on a different network than home assistant.

I notice a lot of variation in my connection attempts.
Sometimes it works and sometimes it says disconnected (trying again solves the issue).
Sometimes it loads the stream within a second (mostly for an older hikvision camera) and sometimes it takes half a minute.
Any suggestions on how I can get it to load more consistently (without fails and fast)?

Thank you for this addon.
I’ve installed it and configured 2 4K Hikvision cams.
Eveything works fine when I configure the low-res substrams, everything is fluid and no impact on Home Assistant CPU.
However when I set the 4K streams, it works but stops every few seconds and I observe that my Home Assistant CPU usage bumps from an average of 5% to 15%.

EDIT : maybe due to tha fact that my cameras and my Home Assistant are not on the same VLAN…

I wanted to flag that this addon causes home assistant snapshots to explode in size.
Mine tripled to >300MB.
Is there any particular reason why this addon takes up more than 200MB in the snapshots?

1 Like

All working great with Tapo C200 camera, thanks for sharing this.

Quick question. Since I am using HA Cloud for external access, how do I fix to access to camera? When trying it says failed (image below).

In the documentation for this add-on it says that in your router you need to forward a series of ports to your Home Assistant IP address. Have you tried that?

I did and I thought maybe that is more related if you have externel access through public IP and not HA cloud. Until now, that seems the case.

I assule you are using Nabu Casa. I’m using my own domain in combination with NGINX Proxy manager and let’s encrypt, for me the solution was to do the port forwarding. But your case might be different indeed.

1 Like

Hi @AlexxIT,

When I start the Addon it consumes 2MB/s bandwidth even if I don’t click into the Web UI to watch the stream. Is there anyway to stop this and for it to consume bandwidth only if I choose to watch a camera.

Sadly, I live in an area with poor broadband and limited bandwidth

Same observation here !

Hi all. I updated addon to new version Pion library (main WebRTC library on which the project is based). Maybe more codecs will be supported, I don’t know for sure.

It works pretty fine.

2 little concerns though :

  • Home Assistant CPU usage has increased of 2-3% in average when the addon is running, even when the streams are not displayed
  • My whole HA system daily backup has trippled, from about 100Mo to more than 300Mo ! That’s about 200Mo for RTSPWebRTC alone. That’s huge.

I see problem about 200MB. Will fix in futher updates.


Please share what cameras you have worked (brand and model), I will add to the readme. And share if camera have sound and if addon support it.

Tested OK on :

  • Hikvision DS-2CD2T47G1-L
  • Annke C800 (flashed with Hikvision firmware)