Realtime camera streaming without any delay - WebRTC

@AlexxIT I am having the same issue as these guys: https://github.com/AlexxIT/WebRTC/issues/6
I have a quite fresh Home Assistant installation, v. 2021.8.8, hacs 1.15.2, and after installation from hacs when trying to add the BigBuckBunny sample I’m getting the Custom element doesn’t exist: ‘webrtc-camera’ error when trying to add it to dashboard. I can see the WebRTC camera in hacs integrations, also there is a folder in custom_components. I’ve tried also manual installation, removed in hacs, and copied the folder manually - it didn’t get pick up at all, in hacs or integration. Could you take a look at what might be the issue?

2 Likes

Did you take this steps:
Configuration > Integrations > Add Integration > WebRTC
?

14.7.1 is the IOS Version

Yes, and still having the same issue:

1 Like

I was hoping to use WebRTC for a diy baby monitor based on a RPi, RPi camera & USB mic. Using UV4L-raspicam and v4l2-rtspserver gets me a rtsp video and audio stream that I can see and hear fine in vlc. The video is fine in HA with WebRTC (impressive lack of delay), but there is no audio.

Any ideas why this is the case, and what can be done about it please?

@chsims1 have you seen DIY Smart Doorbell with Android notifications

I use this card for sound and a seperate WebRTC card for video all seems to work well.

1 Like

Supported audio codecs are listed on github

So, presumably the mic handled by ALSA is producing a wav, and I need to convert to aac??

@Mark53 Thanks, I’ll look there if I can’t get a single stream working :wink:

No, WebRTC doesn’t support AAC.

Got an error,
type provided video/mp4 codecs avc1.00000 is unsupported.

Can I do smth on my side to make it work?

AVC1 it’s H.264. Should supported in every normal browser.

@AlexxIT you know what might be the issue in my case?

Maybe Lovelace configured in YAML file in your case

I don’t know what happened, after a couple of HA restarts when I was working on a dashboard, suddenly the WebRTC card started to appear in the selector. Anyway, sorry for bothering you.

You have to refresh your HA frontend and clear cache, just like how you have to with HACS when you install a new frontend plugin. Doing this on multiple computers after I installed the integration solved it for me. I also had to do this on an Android tablet to make the configured card show up, even after I added it from another computer.

1 Like

Hmm the speed and sound of this addon is amazing, awesome work !!
externally i can’t get it to work though, added UDP 50000-50255 in WebRTC addon and in router to my HA (it wont let me do more than 255 ports though)
i’m running Home Assistant in container though , does the container need to expose those ports as well ?
-p 50000 ?

It’s better to use network=host for Hass container

1 Like

is it possible to set aspect ratio somewhere?
my images are stretched when using sub stream.

O wait , I have it setup as host

Or does the camera need those ports opened…?