mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-11 13:45:25 +03:00
fix
This commit is contained in:
parent
dd502cdfdc
commit
6b031d33bf
@ -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."
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user