mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 18:55:23 +03:00
fix: allow env var templating for go2rtc rtsp creds
This commit is contained in:
parent
e3b9998879
commit
e0f4f3a007
@ -64,9 +64,20 @@ else:
|
|||||||
# as source for frigate and the integration supports HLS playback
|
# as source for frigate and the integration supports HLS playback
|
||||||
if go2rtc_config.get("rtsp") is None:
|
if go2rtc_config.get("rtsp") is None:
|
||||||
go2rtc_config["rtsp"] = {"default_query": "mp4"}
|
go2rtc_config["rtsp"] = {"default_query": "mp4"}
|
||||||
elif go2rtc_config["rtsp"].get("default_query") is None:
|
else:
|
||||||
|
if go2rtc_config["rtsp"].get("default_query") is None:
|
||||||
go2rtc_config["rtsp"]["default_query"] = "mp4"
|
go2rtc_config["rtsp"]["default_query"] = "mp4"
|
||||||
|
|
||||||
|
if go2rtc_config["rtsp"].get("username") is not None:
|
||||||
|
go2rtc_config["rtsp"]["username"] = go2rtc_config["rtsp"]["username"].format(
|
||||||
|
**FRIGATE_ENV_VARS
|
||||||
|
)
|
||||||
|
|
||||||
|
if go2rtc_config["rtsp"].get("password") is not None:
|
||||||
|
go2rtc_config["rtsp"]["password"] = go2rtc_config["rtsp"]["password"].format(
|
||||||
|
**FRIGATE_ENV_VARS
|
||||||
|
)
|
||||||
|
|
||||||
# need to replace ffmpeg command when using ffmpeg4
|
# need to replace ffmpeg command when using ffmpeg4
|
||||||
if not os.path.exists(BTBN_PATH):
|
if not os.path.exists(BTBN_PATH):
|
||||||
if go2rtc_config.get("ffmpeg") is None:
|
if go2rtc_config.get("ffmpeg") is None:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user