Realtime camera streaming without any delay - WebRTC

Also, if you need it, the url: rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=2&unicast=true&proto=Onvif

I canā€™t seem to get the stream from outside my network.
Iā€™m trying via duckdns and via Nabu Casa.
HA is running within Proxmox, what settings should I use?
Iā€™ve got Reolink 510 cameraā€™s.

My url for the camera: url: ā€˜rtsp://admin:[email protected]:554//h264Preview_01_mainā€™
I think there might be the catch.
The stream does initiate and says connected, but no image is coming.

Anyone got it working trying to Access stream from android device with mobile data ie. 3G/LTE using nabu Casa?

It works for me: Android + Private IP + LTE.

WAN connection doesnā€™t depends on Android or Camera model or NabuCasa. It only depends on your home provider and your mobile provider.

So I donā€™t get it really. Why I can access stream using nabu casa but not from android/LTE but from PC?

All tech info described in FAQ. Your mobile provider probably using symmetric NAT

1 Like

Hi Alexey,

So this card is coming along very nicely. Unfortunately on my kindle fires with fully kiosk the banner across the top that displays ā€œConnectedā€ or ā€œRestart Connectionā€ or ā€œConnected to WANā€ never goes away. Is there any chance of disabling that banner completely?

I know this bug. It happens after reconnect. You may create issue. So I donā€™t forget to fix it

1 Like

I have tried this addon and itā€™s working good for my TP link C200 and Dafang hacked version.

However, there is no full screen option on the card on Android devices. Is this expected? Or maybe my card is too small till the full screen view option is not visible?

Just want to updateā€¦the full screen view is missing due to small view card is too small.

Who has a large CPU load from a component?
I think the problem is with the Celeron processor.
Because my Raspberry 3 consumes CPU 4-6% for 4 cameras.
The Nuc i3 also has no problems.

I didnā€™t notice any significant CPU usage but I didnā€™t really do much formal testing.

I think the biggest thing left to figure out is if itā€™s possible to reduce initial connection time. Itā€™s about 15 seconds for meā€¦ Is there any way that the addon could keep the RTSP stream open and just start serving the WebRTC stream when the cards connect? In my experience in telephony, initiating a WebRTC stream can be done sub-second.

I did notice the CPU usage increased overtime and Iā€™m running the HA with RPi4 with 8GB ram. Yesterday I tried to the WebRTC with single camera and initially the CPU usage is all good, ~10%.
But after couple of the lovelace UI page reload as I was trying to adjust my cards, it started to jump to ~25%. I have then removed the WebRTC card and the CPU usage didnā€™t drop and stays at ~25%. And I have to do a HA reboot to get it back <10%.

One more thing, I notice the WebRTC live feed starts to become sluggish after some times. I have wall mount dashboard running with RPi4 with 4gb ram. So I wasnā€™t sure if itā€™s because of the dashboard RPi4 is becoming sluggish.

BIG update! Starting with version 2 the component supports two protocols automatically and simultaneously. WebRTC in some cases may not work with remote access, then the video will play using MSE. As soon as WebRTC is able to connect - video will play through it, MSE will be stopped.

Read the technology comparison in the readme.

5 Likes

@AlexxIT Wow, thanks for your amazing work. Since the upgrade, I am not noticing any improvement in loading. I am woundering if the error below is the reason? I am not getting any errors in the logs.

    at HTMLVideoElement.<anonymous> (webrtc-camera.js:233

Sorry the full message is;
Uncaught TypeError: Cannot read property 'getAudioTracks' of null at HTMLVideoElement.<anonymous> (webrtc-camera.js:233)

I forgot to test the custom UI. Fix in the master version of the component

Hi Alexey, I love your component but v2.0.0.0 update broke it for me.
Error in logs: [139975370842992] Received invalid command: webrtc/stream. And the card displays: ERROR: ā€œcodeā€:ā€œunknown_commandā€, ā€œmessageā€:ā€œUnknown command.ā€
Config is unchanged and it worked woderfully before the upgrade. I even added webrtc: true, without any effect.
What can be the issue?

browser cache.

@AlexxIT is there a way to add ?v1 for example parameter to released versions js file just to avoid cache issues?

Thanks so much. Clearing the cache solved it!