Any congestion between the Home Assistant host, the router and the web browser will lead to dropped packets, which will cause TCP to pause the stream while it spends seconds trying to confirm retransmission (instead of forgetting about the past, and focussing on the present). Viewing a real-time stream over TCP (i.e., HTTP) is not optimal.This will add a processing delay, which will also vary depending on system load. Home Assistant is trying to transcode the RTSP stream in real-time.I see two reasons for the performance problems: However, if I viewed the same camera feed through Home Assistant, there was a delay in the stream of up to 10 seconds, and a lot of stuttering. I could open the “sub” RTSP stream in VLC (at a URL like and enjoy less than 1 second latency at about 25 FPS. This camera provides an high-res (“main”) and a low-res (“sub”) RTSP stream, which I could open directly in VLC. I did my testing using a €60 Reolink 520A PoE IP camera, which is hardwired into the same gigabit network as my workstation and the Home Assistant host (a Home Assistant Blue, i.e., an Odroid N2+). No one wants that.įixing this involved: (1) fixing camera feed performance, (2) making picture-in-picture (PiP) work on android TV, and (3) sending the camera feeds into the new PiP feature. In my limited testing, the normal result is that I get to watch an action replay of my awkward pandemic-era tipping interaction with the delivery guy as soon as I plop myself back in the couch. A stream delay of 10+ seconds is a problem for all of us who want our door camera to usefully display when someone presses the doorbell. My best understanding is that this processing delay is related to Home Assistant transcoding the IP camera stream into HLS (via the generic_camera, stream and ffmpeg integrations), so they can be consumed in a web browser. However, even for local video streams from IP cameras, Home Assistant adds a processing delay. In my experience, this can be shocking 5-15 seconds under normal conditions. If your video is from a cloud-based camera, like a Ring or Nest doorbell, you will have the unavoidable delay added by the internet roundtrip, plus the processing delay on the cloud server. For example, your Netflix show will be replaced by the doorbell feed, and you’ll need to navigate back into it again to restart it. First, any content that is already being played will be rudely interrupted. Home Assistant natively allows you to cast a camera feed to an Android TV, but when I tried to embrace this feature I found two big drawbacks. I have therefore rewritten this guide, and I recommend you head over to the new version instead. In particular, go2rtc was launched, which I now use instead of either of the WebRTC Camera or RTSPtoWeb options I discuss below. Things have moved on since I initially wrote this post. This is achieved using a modest IP camera, an Android TV (in my case an Nvidia Shield set top box), a side-loaded app called Pipup on the Android TV and Home Assistant. This all happens locally, without any cloud services, and should work with any IP camera that provides an RTSP stream. I’ve found a way to get a RTSP camera feed to display in a picture-in-picture popup on my TV, without interrupting any other viewing that might be going on.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |