Realtime camera streaming without any delay - WebRTC

I got this working smoothly. I had MSE enabled and not RTC. With RTC it works correctly.

But now i dont understand where I can change this stream to RTC mode.
Because in MSE it plays few second and after that pauses.

I use this PiP tutorial code:

display_driveway_pip_popup_on_tv:
alias: Display Driveway PIP Popup on TV
mode: single
variables:
link_id: ‘{% for _ in range(40) %}{{ range(10)|random }}{% endfor %}’
sequence:

  • service: webrtc.create_link
    data:
    link_id: ‘{{ link_id }}’
    entity: camera.front_driveway
    open_limit: 1
    time_to_live: 60
  • service: rest_command.pipup_url_on_tv
    data:
    title: Door
    message: Someone is at the front door
    width: 640
    height: 480
    url: PUBLIC_ROOT_URL/webrtc/embed?url={{ link_id }}&webrtc=false

already tried webrtc=true but nothing changed

Hello. Please help me figure it out. I installed from HACKS - WebRTC Camera 3.1.0 It says that to work instead of RTSPtoWebRTC, you need to install go2rtc. I did it and added 4 cameras in the web interface. Of these, it turned out to get an image of only 2 that really work better. After that I can’t add the card to the page.
Custom element doesn't exist: webrtc-camera.
I tried installing RTSPtoWebRTC or RTSPtoWeb - WebRTC and also adding integration, but nothing helps.
Tell me is it no longer supported Home Assistant? Are there any analogues to improve the video broadcast?

As I know, docs say, that you didn’t need to install go2rtc manually.

Hi!

I’m trying to setup my camera, all is installed and the picture of the camera is shown, but I’m not able to make a realtime camera, the image is freeze and I don’t know what happens… I read the instructions several times with no results.

UPDATE. The camera does not streaming, only take a “snapshot” when the tab is opened, if I refresh manually the tap the image changes.

Where do you make this change? I see that my video windows also show MSE in the corner but haven’t seen where the setting is.

1 Like

In lovelace i can use RTC

mse: false
muted: true
type: custom:webrtc-camera
url: camera.loft

But i cant figure out how in TV to use RTC.

Did you get anywhere with the nest doorbell and webrtc? I have the Nest Doorbell (Battery) and it supports WebRTC streaming, but same issues with using the entity…

This feels like the wrong thread given this is about a custom component and nest webrtc uses built in cards.

How about starting a new thread with more detail and I’m happy to join in if you mention me or msg.

Has anyone looked into integrating Janus with HomeAssistant? Seems like it might be an easy way to add lots of camera support.

I’m using the go2rtc home assistant add-on to pull in streams from several reolink cameras via the reolink NVR. I then use the webrtc card in my dashboard to show the streams as needed. This is all working fine and is very quick to load.

However…if I leave the dashboard card open on my ipad (HA app) so i can keep an eye on the feed (I use it as a baby monitor), after a couple minutes, the stream freezes and the only way to fix it is to reload the dashboard. From my laptop, I don’t have this issue - if I leave the HA window active, the feed stays for hours without any problem.

Has anyone else experienced this? Is there anything I can do to troubleshoot and figure out why it’s freezing only on the ipad?

In case it matters, I am using a browser mod popup to show the stream:

  - type: template
    entity: camera.theo_bedroom_camera_main
    icon: mdi:baby
    content: Cam
    tap_action:
      action: fire-dom-event
      browser_mod:
        service: browser_mod.popup
        data:
          size: fullscreen
          title: Théo's Room
          content:
            type: custom:webrtc-camera
            entity: camera.theo_bedroom_camera

Edit: I tested this on my iPhone today and there it works fine … no freezing after almost an hour. My phone is pretty new (iphone 14 pro) while the ipad is old (from 2017) so perhaps that’s something to do with it?

I have a very similar issue, I assume is related. I can leave the iPad on for days if I use the camera original RTSP stream on a regular Picture Entity card (UniFi camera in my case), but if I run the stream through go2rtc and use the webrtc card, the stream freezes in Safari or, worse yet, if the browser is not Safari it just crashes after a few minutes. I’ve been using Moki Kiosk browser for a couple of years and it’s great for a totally full-screen Lovelace dashboard, and webrtc is the only add-on/integration/etc that makes it crash.

1 Like

I have an issue where some of my cameras (armcrest) only show “MSE” stream. My other generic cheaper/low res cams show RTC without issue. I see no errors for the Amcrest cams and these are mostly audio only. They units with Audio and Video do same.

Any suggestions for where to start checking this. I am using latest version Go2RTC 1.5.0

@tmjpugh
Advice the same as with any other software. You need to start checking logs. Go2rtc logs. Maybe some errors there.

Also useful to know problem camera videos. You can get this info from WebUI info page.

@uspino
It’s very important to know with what technology you have problems, WebRTC, MSE or any other.

Also important to know go2rtc version.

WebRTC, latest go2rtc version…

What iOS version on your iPad?

Latest: 16.4.1

Is your iPad running on an M1 processor?

Yes. Thank you for taking a look at it. Let me know if I can upload some logs.

I have no other ideas, except problem in M1 processor. It has some bags with hardware decoding H264 in Safari. You can try to use ffmpeg source with transcoding. And check if it helps.