Skip to content

Commit 196171c

Browse files
committed
Don't need these logging statements
1 parent 59f158e commit 196171c

File tree

3 files changed

+2
-16
lines changed

3 files changed

+2
-16
lines changed

auto_editor/analyze.py

+2-11
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,6 @@ def media_length(self) -> int:
170170
# If there's no audio, get length in video metadata.
171171
import av
172172

173-
av.logging.set_level(av.logging.PANIC)
174-
175173
with av.open(f"{self.src.path}") as cn:
176174
if len(cn.streams.video) < 1:
177175
self.log.error("Could not get media duration")
@@ -227,11 +225,7 @@ def cache(self, tag: str, obj: dict[str, Any], arr: np.ndarray) -> np.ndarray:
227225
except Exception:
228226
json_object = {}
229227

230-
entry = {
231-
"type": str(arr.dtype),
232-
"arr": arr.tolist(),
233-
}
234-
228+
entry = {"type": str(arr.dtype), "arr": arr.tolist()}
235229
src_key = f"{self.src.path}"
236230

237231
if src_key in json_object:
@@ -344,13 +338,10 @@ def cleanhtml(raw_html: str) -> str:
344338
def motion(self, s: int, blur: int, width: int) -> NDArray[np.float64]:
345339
import av
346340

347-
av.logging.set_level(av.logging.PANIC)
348-
349-
mobj = {"stream": s, "width": width, "blur": blur}
350-
351341
if s >= len(self.src.videos):
352342
raise LevelError(f"motion: video stream '{s}' does not exist.")
353343

344+
mobj = {"stream": s, "width": width, "blur": blur}
354345
if (arr := self.read_cache("motion", mobj)) is not None:
355346
return arr
356347

auto_editor/ffwrapper.py

-2
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,6 @@ def __repr__(self) -> str:
192192
def initFileInfo(path: str, log: Log) -> FileInfo:
193193
import av
194194

195-
av.logging.set_level(av.logging.PANIC)
196-
197195
try:
198196
cont = av.open(path, "r")
199197
except av.error.InvalidDataError:

auto_editor/render/video.py

-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
from auto_editor.utils.types import Args
2828

2929

30-
av.logging.set_level(av.logging.PANIC)
31-
32-
3330
@dataclass(slots=True)
3431
class VideoFrame:
3532
index: int

0 commit comments

Comments
 (0)