Formatting

This commit is contained in:
Nick Mowen 2022-10-27 13:01:45 -06:00
parent f782816de4
commit 65e7e2d1d1
2 changed files with 7 additions and 2 deletions

View File

@ -524,7 +524,9 @@ class JsmpegStreamConfig(FrigateBaseModel):
class RestreamConfig(FrigateBaseModel): class RestreamConfig(FrigateBaseModel):
enabled: bool = Field(default=True, title="Restreaming enabled.") enabled: bool = Field(default=True, title="Restreaming enabled.")
force_audio: bool = Field(default=False, title="Force audio compatibility with the browser.") force_audio: bool = Field(
default=False, title="Force audio compatibility with the browser."
)
jsmpeg: JsmpegStreamConfig = Field( jsmpeg: JsmpegStreamConfig = Field(
default_factory=JsmpegStreamConfig, title="Jsmpeg Stream Configuration." default_factory=JsmpegStreamConfig, title="Jsmpeg Stream Configuration."
) )

View File

@ -30,7 +30,10 @@ class RestreamApi:
for input in camera.ffmpeg.inputs: for input in camera.ffmpeg.inputs:
if "restream" in input.roles: if "restream" in input.roles:
if input.path.startswith("rtsp") and not camera.restream.force_audio: if (
input.path.startswith("rtsp")
and not camera.restream.force_audio
):
self.relays[cam_name] = input.path self.relays[cam_name] = input.path
else: else:
# go2rtc only supports rtsp for direct relay, otherwise ffmpeg is used # go2rtc only supports rtsp for direct relay, otherwise ffmpeg is used