Add on: RTSPtoWeb and RTSPtoWebRTC

Generally, see https://github.com/deepch/RTSPtoWeb#limitations and https://github.com/deepch/RTSPtoWebRTC#limitations to see limitations of the servers. My impression is that you can use RTSPtoWebRTC which has better audio support until this is added to RTSPtoWeb

Without the addon my cameras (TP-Link Tapo C200) were fluid but had a delay of several seconds.

I installed the addon and configured the auto-detected integration. The feeds definitely changed. But something is wrong: through the RTSPtoWEB GUI, the feeds are fluid and with a very small delay. But in the picture-glance card they’re now frozen and are updated only every 10-20 seconds or so.

Any suggestion on how to troubleshoot this?

Thanks in advance!

Are you using live? Does it change if you click to open the stream in us own window?

Check out the video link above. From what you described it is not working.

It’s working for me with nest cameras, so not sure. Maybe check the addon logs? See all the caveats about network setup, etc as this is pretty picky.

Hum… I wasn’t using live. camera_view was set to auto. I now changed them to live and things are looking better. Of the 3 cameras, one is now fluid (so the live did make a difference, thanks!) but the other two keep showing these glitchy green images:


The 3 cameras have similar configurations so I don’t know why one behaves differently.

Ah, and everything shows up flawlessly in the RTSPtoWEB GUI. Very fluid.

Any advice?

Thanks!!

anybody having an issue with a “jittery” feed? I’m seeing it in the RTSPtoWebRTC UI so I don’t think it’s a HA issue.

I am pretty new to HA and not really understand what you mean with this @allenporter ? :relaxed:

Sometimes I get this error

Failed to start WebRTC stream: RTSPtoWeb server communication failure: [Errno 104] Connection reset by peer

And this says in log of add-on

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x68453c]
goroutine 222 [running]:
main.(*MuxerHLS).WritePacket(0x0, 0x4000523d40)
/workspace/hlsMuxer.go:48 +0x2c
main.(*StorageST).HlsMuxerWritePacket(0x400042aff0, 0x40004e403d, 0x12, 0xd9d200, 0x1, 0x4000523d40)
/workspace/storageStreamChannel.go:366 +0x178
main.StreamServerRunStream(0x40004e403d, 0x12, 0xd9d200, 0x1, 0x40001b6000, 0x0, 0x0, 0x0)
/workspace/streamCore.go:173 +0x818
main.StreamServerRunStreamDo(0x40004e403d, 0x12, 0xd9d200, 0x1)
/workspace/streamCore.go:43 +0x3f0
created by main.(*StorageST).StreamEdit
/workspace/storageStream.go:65 +0x470
[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.

OR:

[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…
[12:48:07] INFO: Updating configuration
[cont-init.d] 01-rtsp-to-web: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[12:48:07] INFO: Starting discovery service
[12:48:07] INFO: Starting RSTPtoWeb
time=“2022-02-20T12:48:07+02:00” level=info msg=“Server CORE start” func=main module=main
time=“2022-02-20T12:48:07+02:00” level=info msg=“Server RTSP start” call=Start func=RTSPServer module=rtsp_server
time=“2022-02-20T12:48:07+02:00” level=info msg=“Server HTTP start” call=Start func=RTSPServer module=http_server
time=“2022-02-20T12:48:07+02:00” level=info msg=“Server start success a wait signals” func=main module=main
[12:48:08] INFO: Successfully send discovery information to Home Assistant (8083).
time=“2022-02-20T12:49:58+02:00” level=info msg=“Run stream” call=Run channel=0 func=StreamServerRunStreamDo module=core stream=camera.living_room
time=“2022-02-20T12:49:59+02:00” level=info msg=“Success connection RTSP” call=Start channel=0 func=StreamServerRunStream module=core stream=camera.living_room
time=“2022-02-20T12:50:06+02:00” level=info msg=“Run stream” call=Run channel=0 func=StreamServerRunStreamDo module=core stream=camera.living_room
time=“2022-02-20T12:50:06+02:00” level=info msg=“Stream exit by signal or not client” call=StreamServerRunStream channel=0 func=StreamServerRunStreamDo module=core stream=camera.living_room
time=“2022-02-20T12:50:07+02:00” level=info msg=“Success connection RTSP” call=Start channel=0 func=StreamServerRunStream module=core stream=camera.living_room
time=“2022-02-20T12:50:12+02:00” level=info msg=“Run stream” call=Run channel=0 func=StreamServerRunStreamDo module=core stream=camera.living_room
time=“2022-02-20T12:50:12+02:00” level=info msg=“Stream exit by signal or not client” call=StreamServerRunStream channel=0 func=StreamServerRunStreamDo module=core stream=camera.living_room
time=“2022-02-20T12:50:13+02:00” level=info msg=“Success connection RTSP” call=Start channel=0 func=StreamServerRunStream module=core stream=camera.living_room
time=“2022-02-20T12:50:16+02:00” level=error msg=“stream no video” call=ErrorStreamNoVideo channel=0 func=HTTPAPIServerStreamWebRTC module=http_webrtc stream=camera.living_room
time=“2022-02-20T12:50:20+02:00” level=error msg=“stream no video” call=ErrorStreamNoVideo channel=0 func=HTTPAPIServerStreamWebRTC module=http_webrtc stream=camera.living_room
time=“2022-02-20T12:50:44+02:00” level=error msg=“WebRTC Client Offline” call=WritePacket channel=0 func=HTTPAPIServerStreamWebRTC module=http_webrtc stream=camera.living_room

I was able to duplicate my lovelace dashboard tab with my camera views. Then on the duplicate dashboard tab I changed all the cameras to auto in each picture glance card. I used the duplicate for remote view with 5 to 10 seconds delay. When I am home I use the original and see less than one second delay.
For me this is acceptable and gives me easy access to both options.

Forgive me if I have used incorrect terms. I am still learning.

1 Like

I haven’t tried it with this integration yet (didn’t have time to implement it yet), but I did get it working with @AlexxIT’s one (GitHub - AlexxIT/WebRTC: Home Assistant custom component for real-time viewing of almost any camera stream using WebRTC and other technologies.) so it should work with anything that accepts an RTSP stream. I’ve got two Eufy “Indoor Cam 2K Pan and Tilt” cameras.

In the Eufy mobile app, go to the camera’s settings → general → storage → NAS (RTSP) → follow the instructions to enable the RTSP stream. Just ignore all the text saying that it’s only for NAS storage, and click through all the prompts that say to do something on a NAS. In the end it should give you a URL like rtsp://xxxxx:[email protected]/live0. Play it in VLC to ensure it works (Media → Open Network Stream) then just use that URL and you should be good :slight_smile:

Edit: Just tried this one with a Eufy camera and it’s working great too.

Edit 2: I spoke too soon. It works fine initially, but sometimes doesn’t work on refresh, and clicking it to see the large video breaks the card. Maybe it’s something specific to Eufy or how I’ve configured RTSPToWeb. I’ll try to take a closer look over the weekend. On the other hand, AlexxIT’s one works fine except for an issue with CPU usage (CPU usage keeps going up over time).

1 Like

Indeed that’s the link … and do you manually add this stream to the RTSPWeb addon?
I can add it in the RTSPWeb addon interface itself where there stream is available. However I don’t see it available in HA.

I’m using the Eufy Security addon, which creates a camera entity for the camera, however there is no live image available, as it seems Eufy limits it to a couple of minutes.

Thats why I want to add the RTSP stream directly to the RTSPWeb addon interface, where it works and then putt the live stream available in HA. But no idea to do that last step?

It works the other way, add it in home assistant. What url is the integration using? If it’s not giving you the :+1: ght rtsp stream url, why is that? The other way is to add a generic camera for it in home assistant

Still having same problem that not get it to work with Google Nest Camera’s … anybody have any tips? :slight_smile:

I use it with nest. What’s the problem you have? How far did you get in the above steps in the post? Did the instructions in video help?

Same problem here with my tapo c200 camera.

1 Like

Glad to know this is not only happening to me. I hope it gets sorted out soon. Do let me know if you figure out a way to solve it. I’ll do the same. Cheers!

1 Like

I have one question. While viewing cameras on a PC, the preview is loaded and the camera is displayed immediately. There is no auto-play in the HA application for android. I have to press Play to see the camera view. Can you somehow force autoplay like it does on a pc?

@allenporter I followed all the steps as in the video, my problem is that the image stays black with infintive loading symbol, the stream never loads, I also did share some of the logs in my post above

Oh I see, sorry lost that you had previously replied. The crash you mentioned is being track here https://github.com/deepch/RTSPtoWeb/issues/89

I would suggest or stick with LL HLS in the mean time as a workaround.