From f87209605b3e98c388db699f3e151e929b9d3fbc Mon Sep 17 00:00:00 2001 From: droopanu Date: Mon, 6 May 2019 12:59:56 +1200 Subject: [PATCH] Add a TCP timeout of 5 seconds to ffmpeg (#23617) Add a TCP timeout of 5 seconds to ffmpeg to fix stream getting stuck when network connectivity is lost https://github.com/home-assistant/home-assistant/issues/22741 --- homeassistant/components/stream/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/homeassistant/components/stream/__init__.py b/homeassistant/components/stream/__init__.py index 1de1fc35ea1..0e764ecb7a7 100644 --- a/homeassistant/components/stream/__init__.py +++ b/homeassistant/components/stream/__init__.py @@ -53,6 +53,7 @@ def request_stream(hass, stream_source, *, fmt='hls', if isinstance(stream_source, str) \ and stream_source[:7] == 'rtsp://' and not options: options['rtsp_flags'] = 'prefer_tcp' + options['stimeout'] = '5000000' try: streams = hass.data[DOMAIN][ATTR_STREAMS]