This commit is contained in:
Nick Mowen 2023-02-16 15:30:53 -07:00
parent a07e132149
commit 39aa8fe5b1

View File

@ -8,8 +8,8 @@ import yaml
sys.path.insert(0, "/opt/frigate")
from frigate.const import BIRDSEYE_PIPE, BTBN_PATH
from frigate.ffmpeg_presets import (
PRESETS_INPUT,
parse_preset_hardware_acceleration_encode,
parse_preset_input,
)
sys.path.remove("/opt/frigate")
@ -68,7 +68,7 @@ elif go2rtc_config["rtsp"].get("default_query") is None:
# set ffmpeg defaults
if go2rtc_config.get("ffmpeg") is None:
go2rtc_config["ffmpeg"] = {
"http": f"{' '.join(parse_preset_input('preset-http-reolink'))} -i {{input}}"
"http": f"{' '.join(PRESETS_INPUT['preset-http-reolink'])} -i {{input}}"
}
if not os.path.exists(BTBN_PATH):
@ -78,7 +78,9 @@ if go2rtc_config.get("ffmpeg") is None:
] = "-fflags nobuffer -flags low_delay -stimeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i {input}"
else:
if go2rtc_config["ffmpeg"].get("http") is None:
go2rtc_config["ffmpeg"]["http"] = f"{' '.join(parse_preset_input('preset-http-reolink'))} -i {{input}}"
go2rtc_config["ffmpeg"][
"http"
] = f"{' '.join(PRESETS_INPUT['preset-http-reolink'])} -i {{input}}"
if not os.path.exists(BTBN_PATH) and go2rtc_config["ffmpeg"].get("rtsp") is None:
# need to replace ffmpeg command when using ffmpeg4