update VideoCompress

This commit is contained in:
2026-01-11 12:40:07 +08:00
parent 6f304a634c
commit cae41d9bb0
4 changed files with 212 additions and 5928 deletions

View File

@ -123,10 +123,14 @@ def get_video_frame_count(
for key in fallback_order:
try:
func = methods.get(key)
if not func:
try:
func = methods.get(key)
if not func:
continue
n = func(path, stream_index)
except Exception:
logging.debug(f"Errored to get frame with {key}.",exc_info=True)
continue
n = func(path, stream_index)
if isinstance(n, int) and n >= 0:
return n
else: