mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 17:55:21 +03:00
Add option to force audio compatibility
This commit is contained in:
parent
4c9d2636b1
commit
f782816de4
@ -347,6 +347,8 @@ rtmp:
|
|||||||
restream:
|
restream:
|
||||||
# Optional: Enable the restream (default: True)
|
# Optional: Enable the restream (default: True)
|
||||||
enabled: True
|
enabled: True
|
||||||
|
# Optional: Force audio compatibility with browsers (default: shown below)
|
||||||
|
force_audio: False
|
||||||
# Optional: jsmpeg stream configuration for WebUI
|
# Optional: jsmpeg stream configuration for WebUI
|
||||||
jsmpeg:
|
jsmpeg:
|
||||||
# Optional: Set the height of the jsmpeg stream. (default: 720)
|
# Optional: Set the height of the jsmpeg stream. (default: 720)
|
||||||
|
|||||||
@ -524,6 +524,7 @@ 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.")
|
||||||
jsmpeg: JsmpegStreamConfig = Field(
|
jsmpeg: JsmpegStreamConfig = Field(
|
||||||
default_factory=JsmpegStreamConfig, title="Jsmpeg Stream Configuration."
|
default_factory=JsmpegStreamConfig, title="Jsmpeg Stream Configuration."
|
||||||
)
|
)
|
||||||
|
|||||||
@ -30,7 +30,7 @@ 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"):
|
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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user