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