From f782816de4e73ffe8c03426683dab3ce40e5e83e Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Thu, 27 Oct 2022 12:55:23 -0600 Subject: [PATCH] Add option to force audio compatibility --- docs/docs/configuration/index.md | 2 ++ frigate/config.py | 1 + frigate/restream.py | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/docs/configuration/index.md b/docs/docs/configuration/index.md index a59c48a9a..6a401bb1e 100644 --- a/docs/docs/configuration/index.md +++ b/docs/docs/configuration/index.md @@ -347,6 +347,8 @@ rtmp: restream: # Optional: Enable the restream (default: True) enabled: True + # Optional: Force audio compatibility with browsers (default: shown below) + force_audio: False # Optional: jsmpeg stream configuration for WebUI jsmpeg: # Optional: Set the height of the jsmpeg stream. (default: 720) diff --git a/frigate/config.py b/frigate/config.py index 19fead137..f8c5967fd 100644 --- a/frigate/config.py +++ b/frigate/config.py @@ -524,6 +524,7 @@ class JsmpegStreamConfig(FrigateBaseModel): class RestreamConfig(FrigateBaseModel): enabled: bool = Field(default=True, title="Restreaming enabled.") + force_audio: bool = Field(default=False, title="Force audio compatibility with the browser.") jsmpeg: JsmpegStreamConfig = Field( default_factory=JsmpegStreamConfig, title="Jsmpeg Stream Configuration." ) diff --git a/frigate/restream.py b/frigate/restream.py index 9f22c5239..db37ef827 100644 --- a/frigate/restream.py +++ b/frigate/restream.py @@ -30,7 +30,7 @@ class RestreamApi: for input in camera.ffmpeg.inputs: if "restream" in input.roles: - if input.path.startswith("rtsp"): + if input.path.startswith("rtsp") and not camera.restream.force_audio: self.relays[cam_name] = input.path else: # go2rtc only supports rtsp for direct relay, otherwise ffmpeg is used