From d7b5ba9bc8e3f136167c4c3f4c8dcfa8d7d6e570 Mon Sep 17 00:00:00 2001 From: Felipe Santos Date: Tue, 31 Jan 2023 09:35:27 -0300 Subject: [PATCH] Upgrade go2rtc to v1.1.0 and set AAC audio as preferred --- Dockerfile | 2 +- docker/rootfs/usr/local/go2rtc/create_config.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1ddf7d2b1..b5fde686d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,7 @@ RUN --mount=type=tmpfs,target=/tmp --mount=type=tmpfs,target=/var/cache/apt \ FROM wget AS go2rtc ARG TARGETARCH WORKDIR /rootfs/usr/local/go2rtc/bin -RUN wget -qO go2rtc "https://github.com/AlexxIT/go2rtc/releases/download/v1.0.1/go2rtc_linux_${TARGETARCH}" \ +RUN wget -qO go2rtc "https://github.com/AlexxIT/go2rtc/releases/download/v1.1.0/go2rtc_linux_${TARGETARCH}" \ && chmod +x go2rtc diff --git a/docker/rootfs/usr/local/go2rtc/create_config.py b/docker/rootfs/usr/local/go2rtc/create_config.py index 624415633..9636ece21 100644 --- a/docker/rootfs/usr/local/go2rtc/create_config.py +++ b/docker/rootfs/usr/local/go2rtc/create_config.py @@ -31,6 +31,12 @@ if go2rtc_config.get("log") is None: elif go2rtc_config["log"].get("format") is None: go2rtc_config["log"]["format"] = "text" +# the audio from the rtsp stream should use offer aac by default +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" + if not go2rtc_config.get("webrtc", {}).get("candidates", []): default_candidates = [] # use internal candidate if it was discovered when running through the add-on