From da29367e8cadae6005e6da757b9bb2e3d56621be Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Wed, 12 Mar 2025 14:35:40 -0600 Subject: [PATCH] Remove mp4 query, allowing go2rtc to send any audio --- .../rootfs/usr/local/go2rtc/create_config.py | 25 ++++++------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/docker/main/rootfs/usr/local/go2rtc/create_config.py b/docker/main/rootfs/usr/local/go2rtc/create_config.py index 30b78e1e1..5d8e80f9d 100644 --- a/docker/main/rootfs/usr/local/go2rtc/create_config.py +++ b/docker/main/rootfs/usr/local/go2rtc/create_config.py @@ -80,24 +80,15 @@ if go2rtc_config["webrtc"].get("candidates") is None: go2rtc_config["webrtc"]["candidates"] = default_candidates -# 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"} -else: - if go2rtc_config["rtsp"].get("default_query") is None: - go2rtc_config["rtsp"]["default_query"] = "mp4" +if go2rtc_config["rtsp"].get("username") is not None: + go2rtc_config["rtsp"]["username"] = go2rtc_config["rtsp"]["username"].format( + **FRIGATE_ENV_VARS + ) - if go2rtc_config["rtsp"].get("username") is not None: - go2rtc_config["rtsp"]["username"] = go2rtc_config["rtsp"]["username"].format( - **FRIGATE_ENV_VARS - ) - - if go2rtc_config["rtsp"].get("password") is not None: - go2rtc_config["rtsp"]["password"] = go2rtc_config["rtsp"]["password"].format( - **FRIGATE_ENV_VARS - ) +if go2rtc_config["rtsp"].get("password") is not None: + go2rtc_config["rtsp"]["password"] = go2rtc_config["rtsp"]["password"].format( + **FRIGATE_ENV_VARS + ) # ensure ffmpeg path is set correctly path = config.get("ffmpeg", {}).get("path", "default")