From fc02b7cfecafff73a957a8aa90c1e07f8f4e19eb Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Wed, 1 Feb 2023 08:12:59 -0700 Subject: [PATCH] Set default_query --- docker/rootfs/usr/local/go2rtc/create_config.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docker/rootfs/usr/local/go2rtc/create_config.py b/docker/rootfs/usr/local/go2rtc/create_config.py index 624415633..580963431 100644 --- a/docker/rootfs/usr/local/go2rtc/create_config.py +++ b/docker/rootfs/usr/local/go2rtc/create_config.py @@ -43,6 +43,14 @@ if not go2rtc_config.get("webrtc", {}).get("candidates", []): go2rtc_config["webrtc"] = {"candidates": default_candidates} else: print("[INFO] Not injecting WebRTC candidates into go2rtc config as it has been set manually", file=sys.stderr) + +# sets default RTSP response to be equivalent to ?video=h264,h265&audio=aac +# this means user does not need to specify audio codec when using restream +# as source for frigate and the integration supports HLS playback +if go2rtc_config.get("rtsp") is None: + go2rtc_config["rtsp"] = {"default_query": "mp4"} +elif go2rtc_config["rtsp"].get("default_query") is None: + go2rtc_config["rtsp"]["default_query"] = "mp4" # need to replace ffmpeg command when using ffmpeg4 if not os.path.exists(BTBN_PATH):