|
1 | 1 | diff --git a/frigate/config/camera/ffmpeg.py b/frigate/config/camera/ffmpeg.py |
2 | | -index 04bbfac7..4390a571 100644 |
| 2 | +index 04bbfac7..396bcc4b 100644 |
3 | 3 | --- a/frigate/config/camera/ffmpeg.py |
4 | 4 | +++ b/frigate/config/camera/ffmpeg.py |
5 | | -@@ -70,18 +70,14 @@ class FfmpegConfig(FrigateBaseModel): |
| 5 | +@@ -1,4 +1,5 @@ |
| 6 | + from enum import Enum |
| 7 | ++from os.path import join |
| 8 | + from typing import Union |
| 9 | + |
| 10 | + from pydantic import Field, field_validator |
| 11 | +@@ -69,21 +70,11 @@ class FfmpegConfig(FrigateBaseModel): |
| 12 | + |
6 | 13 | @property |
7 | 14 | def ffmpeg_path(self) -> str: |
8 | | - if self.path == "default": |
| 15 | +- if self.path == "default": |
9 | 16 | - return f"/usr/lib/ffmpeg/{DEFAULT_FFMPEG_VERSION}/bin/ffmpeg" |
10 | 17 | - elif self.path in INCLUDED_FFMPEG_VERSIONS: |
11 | 18 | - return f"/usr/lib/ffmpeg/{self.path}/bin/ffmpeg" |
12 | | -+ return "@ffmpeg@" |
13 | | - else: |
14 | | - return f"{self.path}/bin/ffmpeg" |
| 19 | +- else: |
| 20 | +- return f"{self.path}/bin/ffmpeg" |
| 21 | ++ return join(self.path, "bin/ffmpeg") |
15 | 22 |
|
16 | 23 | @property |
17 | 24 | def ffprobe_path(self) -> str: |
18 | | - if self.path == "default": |
| 25 | +- if self.path == "default": |
19 | 26 | - return f"/usr/lib/ffmpeg/{DEFAULT_FFMPEG_VERSION}/bin/ffprobe" |
20 | 27 | - elif self.path in INCLUDED_FFMPEG_VERSIONS: |
21 | 28 | - return f"/usr/lib/ffmpeg/{self.path}/bin/ffprobe" |
22 | | -+ return "@ffprobe@" |
23 | | - else: |
24 | | - return f"{self.path}/bin/ffprobe" |
| 29 | +- else: |
| 30 | +- return f"{self.path}/bin/ffprobe" |
| 31 | ++ return join(self.path, "bin/ffprobe") |
| 32 | + |
25 | 33 |
|
| 34 | + class CameraRoleEnum(str, Enum): |
26 | 35 | diff --git a/frigate/record/export.py b/frigate/record/export.py |
27 | | -index 0d3f96da..09cadbcd 100644 |
| 36 | +index 0d3f96da..463bcff4 100644 |
28 | 37 | --- a/frigate/record/export.py |
29 | 38 | +++ b/frigate/record/export.py |
30 | 39 | @@ -126,7 +126,7 @@ class RecordingExporter(threading.Thread): |
31 | 40 | minutes = int(diff / 60) |
32 | 41 | seconds = int(diff % 60) |
33 | 42 | ffmpeg_cmd = [ |
34 | 43 | - "/usr/lib/ffmpeg/7.0/bin/ffmpeg", # hardcode path for exports thumbnail due to missing libwebp support |
35 | | -+ "@ffmpeg@", # hardcode path for exports thumbnail due to missing libwebp support |
| 44 | ++ FfmpegConfig.ffmpeg_path, # hardcode path for exports thumbnail due to missing libwebp support |
36 | 45 | "-hide_banner", |
37 | 46 | "-loglevel", |
38 | 47 | "warning", |
39 | | -~ |
|
0 commit comments