From efded35c2e233a08e46373cc12761f64dc30ffbf Mon Sep 17 00:00:00 2001 From: ed Date: Sat, 2 Jul 2022 00:39:46 +0200 Subject: [PATCH] ffmpeg saying the fps is 1/0 yeah okay --- copyparty/mtag.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/copyparty/mtag.py b/copyparty/mtag.py index dd1e2ec3..1b7a44e9 100644 --- a/copyparty/mtag.py +++ b/copyparty/mtag.py @@ -213,7 +213,10 @@ def parse_ffprobe(txt: str) -> tuple[dict[str, tuple[int, Any]], dict[str, list[ fps = ret[".fps"] if "/" in fps: fa, fb = fps.split("/") - fps = int(fa) * 1.0 / int(fb) + try: + fps = int(fa) * 1.0 / int(fb) + except: + fps = 9001 if fps < 1000 and fmt.get("format_name") not in ["image2", "png_pipe"]: ret[".fps"] = round(fps, 3)