Add option to force audio compatibility

This commit is contained in:
Nick Mowen 2022-10-27 12:55:23 -06:00
parent 4c9d2636b1
commit f782816de4
3 changed files with 4 additions and 1 deletions

View File

@ -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)

View File

@ -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."
)

View File

@ -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