The stream integration provides a way to proxy live streams through Home Assistant. Most users should not need to configure anything or interface with the component directly since it is an internal component used by the camera integration.
stream integration is automatically loaded by
default_config and enabled by the
camera platforms that support it. If
default_config is used, no separate
configuration.yaml entry is necessary. However, there are some extra options you can configure.
The duration of each HLS segment, in seconds (between 2 and 10)
LL-HLS - Low Latency HLS
LL-HLS reduces the start time and delay for a stream, but it has strict timing and network requirements and opens additional browser connections. To avoid running into browser limits it is strongly recommended to use an HTTP/2 proxy (e.g., NGINX or haproxy) to take advantage of request pipelining. LL-HLS is enabled by default, but when not using HTTP/2, the Home Assistant frontend will revert back to regular HLS if too many streams are open.
You can further adjust LL-HLS settings in
configuration.yaml as it may perform better or worse with different values depending on your network setup, cameras, or whether or not they are local or cloud.
# Example LL-HLS configuration.yaml entry. stream: ll_hls: true part_duration: 0.75 segment_duration: 6
The integration currently supports proxying H.264 and H.265 source streams to the HLS (and LL-HLS) protocol.
Note that while H.265 works on Android and iOS, it does not work in many browsers. This is a browser limitation and not a Home Assistant issue. Safari has native H.265 support, and H.265 also works in Edge on Windows when “HEVC Video Extensions” is installed. Chrome versions >= 104 may also work when started with the
For testing HEVC browser support, do not rely on the https://www.caniuse.com charts or the https://html5test.com site. They are inaccurate. You can instead use the “Unprefixed tests” from caniuse.com or the hls.js demo app with an HEVC HLS stream. The videos there should play if your browser supports H.265.
stream integration supports AAC and MP3 audio. PCM codecs (e.g. G.711/G.723/G.726/G.729) are not supported.