Great post and discussions within the topic. Still years later this post is pretty relevant. I’m new to HA and cameras are one of the use cases I plan on having for my place.
In terms of cameras + other automations (lights and motion sensors) running at the same time, is a Raspberry PI 4 8 gb big enough to run everything at the same time?
Going to take a deep dive into a lot of the tech mentioned in here to continue to learn more. Thanks for everyone’s contribution to this thread
There are a lot of big ifs in that question. You should be able to support quite a few cameras if you use the stream component or the WebRTC card. But if you use FFMPEG, you will max out the Pi very quickly, maybe after 1 camera.
Tinkerer
(aka DubhAd on GitHub)
Split this topic
184
Finally merged the LL-HLS PR, but it won’t make it in the 2021.9 release…will have to wait for the 2021.10 beta unless you are comfortable copying the stream code into your components/stream directory
It will depend on the settings used and the camera settings, but on my setup now, using H265+ and a partial segment length of 0.75 seconds, it looks like it’s about 3 seconds (I’m also currently 2000 miles away from my HA instance).
Hmm, not sure where you got the idea that it was iOS only…iOS was actually the last platform I got working because I don’t have an iOS device to test or develop on. Everything else has been mostly working since I opened the PR back in April.
It works on all the clients (browsers, safari, android, ios) I have tried, but my sources are all local cameras using the generic integration. Aside from a minor niggle with the android exoplayer implementation and large keyframe intervals, it works very well.
I can’t guarantee it will work all the time especially with non local cameras since the timing tolerances are quite tight and the implementation relies on segmenting behavior from the ffmpeg libraries that we don’t have fine control over - we will probably have to note that in the docs.
Just give it a try when you get a chance.
loaded it as custom, added verson in manifest
i have the synology camera platform, but i’m unable to see a live view now, as soon as i click on a camera, i have a black screen, thats stuck on loading , this is error below
so my cameras are broken now
removed the PR for now (running 2021.9.4)
2021-09-08 17:18:40 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 144, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 135, in handle
result = await result
File "/config/custom_components/stream/core.py", line 386, in get
return await self.handle(request, stream, sequence)
File "/config/custom_components/stream/hls.py", line 108, in handle
body=self.render(track).encode("utf-8"),
File "/config/custom_components/stream/hls.py", line 87, in render
bandwidth = round(segment.data_size_with_init * 8 / segment.duration * 1.2)
AttributeError: 'Segment' object has no attribute 'data_size_with_init'
stream can’t be loaded in custom_components - if you want to use another version you’ll have to replace the stream folder directly in the HA src folder
ah , but thats always the method i use if i want to test PR stuff, if there are only changes in 1 specific integration, its possible to just load as a custom… so if i place the “stream” folder there, the original “stream” will be ignored
i do run HassOS, so for me not possible to overwrite the original folder
Actually, since it was already merged into dev, you can test it out by switching to dev. See Common Tasks - Operating System - Home Assistant
To set up the LL-HLS options, add the following to your configuration.yaml: