This commit is contained in:
1 parent
016e0cee0c
commit
e92ccd757a
3 files changed
+52
-27
No files matched your search
@@ -118,10 +118,9 @@ def get_duration(path: Path) -> float:
|
||||
)
|
||||
if out.returncode == 0 and out.stdout.strip():
|
||||
d = float(out.stdout.strip())
|
||||
logger.debug("ffprobe %s -> %.0fs in %.2fs", path.name, d, time.monotonic() - t0)
|
||||
return d
|
||||
except (subprocess.TimeoutExpired, ValueError, FileNotFoundError) as e:
|
||||
logger.debug("ffprobe %s failed: %s", path.name, e)
|
||||
except (subprocess.TimeoutExpired, ValueError, FileNotFoundError):
|
||||
pass
|
||||
return DEFAULT_DURATION_SEC
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user