Add on: RTSPtoWeb and RTSPtoWebRTC

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

I have googled for a while now and tried to find it here in the comments but failed, maybe Iā€™m just blind! I donā€™t have the services webrtc.create_link described here: Cast or share camera stream Ā· AlexxIT/WebRTC Wiki Ā· GitHub

I have the WebRTC working in Lovelace and so on, so no issue there. What Iā€™m I missing?

I run:
Home Assistant 2022.11.5
Supervisor 2022.11.2
Operating System 9.3
Frontend 20221108.0 - latest

This would help us to pick a stun server on our own or is there any other intention here? Thanks for sharing

Hi, that is a different custom component that ships the same underlying binary. Also check out go2rtc which has some other threads on this forum.

1 Like

Hi, can you elaborate on your question? Iā€™m not sure exactly how to answer

Why one would need to define a stun server? I thought there are some available ones via google and everyone is using them. (Sorry for not being unclear)

Thanks will have a look:)