diff --git a/docker/rootfs/usr/local/go2rtc/create_config.py b/docker/rootfs/usr/local/go2rtc/create_config.py index 8b570e0bf..0531b173d 100644 --- a/docker/rootfs/usr/local/go2rtc/create_config.py +++ b/docker/rootfs/usr/local/go2rtc/create_config.py @@ -71,7 +71,7 @@ elif go2rtc_config["rtsp"].get("default_query") is None: go2rtc_config["rtsp"]["default_query"] = "mp4" # need to replace ffmpeg command when using ffmpeg4 -if int(os.environ['LIBAVFORMAT_VERSION_MAJOR']) < 59: +if int(os.environ["LIBAVFORMAT_VERSION_MAJOR"]) < 59: if go2rtc_config.get("ffmpeg") is None: go2rtc_config["ffmpeg"] = { "rtsp": "-fflags nobuffer -flags low_delay -stimeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i {input}" diff --git a/frigate/ffmpeg_presets.py b/frigate/ffmpeg_presets.py index b9cbd0653..f08846813 100644 --- a/frigate/ffmpeg_presets.py +++ b/frigate/ffmpeg_presets.py @@ -42,7 +42,9 @@ class LibvaGpuSelector: return "" -TIMEOUT_PARAM = "-timeout" if int(os.environ['LIBAVFORMAT_VERSION_MAJOR']) >= 59 else "-stimeout" +TIMEOUT_PARAM = ( + "-timeout" if int(os.environ["LIBAVFORMAT_VERSION_MAJOR"]) >= 59 else "-stimeout" +) _gpu_selector = LibvaGpuSelector() _user_agent_args = [