mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
ffmpeg saying the fps is 1/0 yeah okay
This commit is contained in:
parent
1d74240b9a
commit
efded35c2e
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue