RTSP streams - re-encoding / use substream?
Posted: Sun Jul 23, 2023 3:43 pm
Hi folks,
I'm struggling a bit with pulling camera streams into Home Assistant via BI. What seems to be happening, is that the BI integration is using the main stream and I suspect is also re-encoding it. My cameras are mostly h.265 and high-res and the usual display devices are a tablet and mobile phones, so using the main streams isn't a good idea.
One example: If I point VLC at the camera's main stream, it's 4k x 2k, h.265; the substream from that cam is 640x480, h.265. The BI RTSP stream for the same camera is 1280x720, h.264, which is very different, so the BI server is having to do quite a lot of work to create that. CPU rises ~5% to stream just one camera (and there is a nVidia GPU in the box!) If I remove the forced image size in BI's web/advanced page, I get the full resolution but still h.264 and with a 2~3 second delay vs the BI console.
What I need, I guess, is to get the camera substream directly, no re-encoding, no anything. I could do that straight from the camera, but it feels messy to mix the BI integration with direct connections to cameras.
Does anyone know how to get a RTSP stream from BI that is the raw substream from the camera and how to persuade the HA integration to use it?
Thanks!
I'm struggling a bit with pulling camera streams into Home Assistant via BI. What seems to be happening, is that the BI integration is using the main stream and I suspect is also re-encoding it. My cameras are mostly h.265 and high-res and the usual display devices are a tablet and mobile phones, so using the main streams isn't a good idea.
One example: If I point VLC at the camera's main stream, it's 4k x 2k, h.265; the substream from that cam is 640x480, h.265. The BI RTSP stream for the same camera is 1280x720, h.264, which is very different, so the BI server is having to do quite a lot of work to create that. CPU rises ~5% to stream just one camera (and there is a nVidia GPU in the box!) If I remove the forced image size in BI's web/advanced page, I get the full resolution but still h.264 and with a 2~3 second delay vs the BI console.
What I need, I guess, is to get the camera substream directly, no re-encoding, no anything. I could do that straight from the camera, but it feels messy to mix the BI integration with direct connections to cameras.
Does anyone know how to get a RTSP stream from BI that is the raw substream from the camera and how to persuade the HA integration to use it?
Thanks!