Add on: RTSPtoWeb and RTSPtoWebRTC

I have checked generic camera implementation to find out how you included webrtc support into it. I own a custom integration (eufy security) and i am implementing camera entities there using rtsp. I want to support webrtc feature as you jave done into generic camera.

Or can we say that all camera implementations are inheriting this feature from generic camera?

Hi, thanks for the follow up. This was implemented so that every rtsp integration can use it, since it is just based on the RTSP stream url. You can see Camera Entity | Home Assistant Developer Docs if you’re developing a custom component for a little detail about how it works.

1 Like

Hi i run this addon and it really helps in faster loading of cards and low latency but any way how to share the camera live feed to echo show?

It may work to cast a home assistant panel that contains the card with a webrtc view in it. I’ve done this on other displays.

Yeah casting should work but unfortunately cant cast in echo devices

OK i may be using the wrong terminology – i don’t have an echo show, but I think the takeaway should be that as a workaround if native webrtc support doesn’t work you can take a panel and try to display the panel on the echo show somehow. For example however this discussion resolves: Alexa Skill to display Lovelace dashboards on Echo Show

1 Like

Thanks for this Alan. My load times have not improved when initially connecting (still about 16 sec) but subsequent views and loading the full resolution stream have improved by about 4x.

Looking forward to remote access. Let us know if you need beta testers for it.

2 Likes

Is it me or is the add-on very unstable?..

I have about 15 cameras and basically after getting 4 cameras in… I’m getting a hard crash of the docker container. Even after removing the cameras, and trying to restart the container, it starts up and dies right away with panic. This panic (the one below) is just with a single camera added.

[s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] 01-rtsp-to-web: executing…
[10:10:15] INFO: Updating configuration
[cont-init.d] 01-rtsp-to-web: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[10:10:16] INFO: Starting discovery service
[10:10:16] INFO: Starting RSTPtoWeb
[10:10:17] INFO: Successfully send discovery information to Home Assistant (8083).
panic: runtime error: index out of range [0] with length 0
goroutine 11 [running]:
main.StreamServerRunStreamRTMP(0xc000039540, 0xf, 0x12dd5e0, 0x1, 0xc0004969a0, 0x0, 0x0, 0x0)
/workspace/streamCore.go:265 +0x1291
main.StreamServerRunStream(0xc000039540, 0xf, 0x12dd5e0, 0x1, 0xc0004969a0, 0x0, 0x0, 0x0)
/workspace/streamCore.go:67 +0x14cb
main.StreamServerRunStreamDo(0xc000039540, 0xf, 0x12dd5e0, 0x1)
/workspace/streamCore.go:47 +0x4fa
created by main.(*StorageST).StreamChannelRunAll
/workspace/storageStreamChannel.go:42 +0x18a
[cont-finish.d] executing container finish scripts…
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

Hi, the add-on runs an existing server. I haven’t seen this issue myself before. Can you file a bug report with the upstream GitHub project?

having the same issue…Panic runtime error…

Allen, I noticed that your plugin pulls the 2.2.0 RTSPtoWeb… and there is a 2.3.0… when will yours get updated so it pulls the latest version (which may resolve the panics many of us are seeing).

Filed a bug report… (so far, no response)… but I did notice that you are using a 2.2.0 base… and the latest (as of 6 months ago) is 2.3.0 which does have a few crash fixes… so maybe this might address the crashes we are seeing?

Oh, I thought it was using 2.3.0. I’m kind of acting like a release manager for RTSPtoWeb so i’ve created 2.4.0 with even more fixes from the underlying vdk library and will make a newaddon release with it: Update to RTSPtoWeb 2.4.0 and release 1.3.0 by allenporter · Pull Request #80 · allenporter/stream-addons · GitHub

Based on comments in the github, it seems like RTSPtoWeb should support audio the same as RTSPtoWebRTC (pcm alaw and pcm mulaw).

However, I can only get audio to work via RTSPtoWebRTC addon. The RTSPtoWeb addon seems to be more stable and provide better/smoother video playback. Is there any way to get the audio stream working on that?

Can you file an issue in the RTSPtoWeb project with details, logs, links to the feed, etc for the author to be able to investigate? You can also test using the server directly over the web UI to confirm, if that helps isolate the issue as the add-on itself should just be a pass through. I’m happy to release a new version of the add-on if the server is updated.

How can I view/edit the addon’s config.json file? I’d like to take a look there before going further up the chain.

Edit: I found this addon go2rtc which meets my needs perfectly. Audio works without issue and video is smooth just like with RTSPtoWeb. It’s also very easy to allow remote access, just have to add a config file and open a port on your router. There are some other features there too which are over my head, but I’m interested in the two-way audio feature and will try digging into that soon. Details are in the github linked above.

@Daniel15 did you get it workding with Eufy Cameras?
I still have the issue that clicking on it will break the card.

Hello All,
Not able to get RTSPtoWeb - WebRTC to show live streaming after setting to live.

How many views of these can be active? I just converted all my RTSP streams to camera entity but that makes them show up on the default homepage, and subsequently it has moved 5%cpu to 19%.

I noticed default camera entity are running 2seconds behind the webrtc ones.

Hi folks, not sure if folks noticed this already but you can now configure a stun server in the rtsp_to_webrtc integration configuration options. You can click Configure and set to something like stun.l.google.com:19302 and you should be good to go using the native webrtc player in home assistant.

3 Likes