Use ffmpeg 6

This commit is contained in:
Nicolas Mowen 2024-09-15 11:35:50 -06:00
parent 86ed3c078c
commit 082b1eb40e
2 changed files with 9 additions and 9 deletions

View File

@ -110,11 +110,11 @@ else:
path = config.get("ffmpeg", {}).get("path", "default")
if path == "default":
if shutil.which("ffmpeg") is None:
ffmpeg_path = "/usr/lib/ffmpeg/7.0/bin/ffmpeg"
ffmpeg_path = "/usr/lib/ffmpeg/6.0/bin/ffmpeg"
else:
ffmpeg_path = "ffmpeg"
elif path == "7.0":
ffmpeg_path = "/usr/lib/ffmpeg/7.0/bin/ffmpeg"
elif path == "6.0":
ffmpeg_path = "/usr/lib/ffmpeg/6.0/bin/ffmpeg"
elif path == "5.0":
ffmpeg_path = "/usr/lib/ffmpeg/5.0/bin/ffmpeg"
else:

View File

@ -890,11 +890,11 @@ class FfmpegConfig(FrigateBaseModel):
def ffmpeg_path(self) -> str:
if self.path == "default":
if shutil.which("ffmpeg") is None:
return "/usr/lib/ffmpeg/7.0/bin/ffmpeg"
return "/usr/lib/ffmpeg/6.0/bin/ffmpeg"
else:
return "ffmpeg"
elif self.path == "7.0":
return "/usr/lib/ffmpeg/7.0/bin/ffmpeg"
elif self.path == "6.0":
return "/usr/lib/ffmpeg/6.0/bin/ffmpeg"
elif self.path == "5.0":
return "/usr/lib/ffmpeg/5.0/bin/ffmpeg"
else:
@ -904,11 +904,11 @@ class FfmpegConfig(FrigateBaseModel):
def ffprobe_path(self) -> str:
if self.path == "default":
if int(os.getenv("LIBAVFORMAT_VERSION_MAJOR", "59")) >= 59:
return "/usr/lib/ffmpeg/7.0/bin/ffprobe"
return "/usr/lib/ffmpeg/6.0/bin/ffprobe"
else:
return "ffprobe"
elif self.path == "7.0":
return "/usr/lib/ffmpeg/7.0/bin/ffprobe"
elif self.path == "6.0":
return "/usr/lib/ffmpeg/6.0/bin/ffprobe"
elif self.path == "5.0":
return "/usr/lib/ffmpeg/5.0/bin/ffprobe"
else: