This commit is contained in:
Nicolas Mowen 2024-05-29 07:13:37 -06:00
parent dd502cdfdc
commit 6b031d33bf
2 changed files with 3 additions and 3 deletions

View File

@ -1418,7 +1418,7 @@ class FrigateConfig(FrigateBaseModel):
if need_detect_dimensions or need_record_fourcc:
stream_info = {"width": 0, "height": 0, "fourcc": None}
try:
stream_info = stream_info_retriever.get_resolution(input.path)
stream_info = stream_info_retriever.get_stream_info(input.path)
except Exception:
logger.warn(
f"Error detecting stream parameters automatically for {input.path} Applying default values."

View File

@ -202,10 +202,10 @@ class StreamInfoRetriever:
def __init__(self) -> None:
self.stream_cache: dict[str, tuple[int, int]] = {}
def get_resolution(self, path: str) -> str:
def get_stream_info(self, path: str) -> str:
if path in self.stream_cache:
return self.stream_cache[path]
info = asyncio.run(get_video_properties(input.path))
info = asyncio.run(get_video_properties(path))
self.stream_cache[path] = info
return info