Stream
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 integration directly since it is an internal integration used by the camera integration.
Configuration
The 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
configuration.yaml 文件是 Home Assistant 的主要配置文件。它列出了要加载的集成及其特定配置。在某些情况下,需要直接在 configuration.yaml 文件中手动编辑配置。大多数集成可以在 UI 中配置。 [Learn more] entry is necessary. However, there are some extra options you can configure.
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
configuration.yaml 文件是 Home Assistant 的主要配置文件。它列出了要加载的集成及其特定配置。在某些情况下,需要直接在 configuration.yaml 文件中手动编辑配置。大多数集成可以在 UI 中配置。 [Learn more] 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 configuration:
# Example LL-HLS configuration.yaml entry.
stream:
ll_hls: true
part_duration: 0.75
segment_duration: 6
Technical details
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 --enable-features=PlatformHEVCDecoderSupport
option.
For testing HEVC browser support, do not rely on the https://www.caniuse.com
The stream
integration supports AAC and MP3 audio. PCM codecs (e.g. G.711/G.723/G.726/G.729) are not supported.