From 8502ea3c063166b2535339ffc7e0870a8e8b44f8 Mon Sep 17 00:00:00 2001 From: WyattBlue Date: Tue, 4 Jun 2024 21:27:22 -0400 Subject: [PATCH] Don't need these logging statements --- auto_editor/analyze.py | 7 +------ auto_editor/ffwrapper.py | 2 -- auto_editor/render/video.py | 3 --- 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/auto_editor/analyze.py b/auto_editor/analyze.py index b3d9c5723..415152d02 100644 --- a/auto_editor/analyze.py +++ b/auto_editor/analyze.py @@ -170,8 +170,6 @@ def media_length(self) -> int: # If there's no audio, get length in video metadata. import av - av.logging.set_level(av.logging.PANIC) - with av.open(f"{self.src.path}") as cn: if len(cn.streams.video) < 1: self.log.error("Could not get media duration") @@ -344,13 +342,10 @@ def cleanhtml(raw_html: str) -> str: def motion(self, s: int, blur: int, width: int) -> NDArray[np.float64]: import av - av.logging.set_level(av.logging.PANIC) - - mobj = {"stream": s, "width": width, "blur": blur} - if s >= len(self.src.videos): raise LevelError(f"motion: video stream '{s}' does not exist.") + mobj = {"stream": s, "width": width, "blur": blur} if (arr := self.read_cache("motion", mobj)) is not None: return arr diff --git a/auto_editor/ffwrapper.py b/auto_editor/ffwrapper.py index b6df2d46f..c2a373c48 100644 --- a/auto_editor/ffwrapper.py +++ b/auto_editor/ffwrapper.py @@ -192,8 +192,6 @@ def __repr__(self) -> str: def initFileInfo(path: str, log: Log) -> FileInfo: import av - av.logging.set_level(av.logging.PANIC) - try: cont = av.open(path, "r") except av.error.InvalidDataError: diff --git a/auto_editor/render/video.py b/auto_editor/render/video.py index 1a17fa7d0..f9f0168af 100644 --- a/auto_editor/render/video.py +++ b/auto_editor/render/video.py @@ -27,9 +27,6 @@ from auto_editor.utils.types import Args -av.logging.set_level(av.logging.PANIC) - - @dataclass(slots=True) class VideoFrame: index: int