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"]
|
fps = ret[".fps"]
|
||||||
if "/" in fps:
|
if "/" in fps:
|
||||||
fa, fb = fps.split("/")
|
fa, fb = fps.split("/")
|
||||||
|
try:
|
||||||
fps = int(fa) * 1.0 / int(fb)
|
fps = int(fa) * 1.0 / int(fb)
|
||||||
|
except:
|
||||||
|
fps = 9001
|
||||||
|
|
||||||
if fps < 1000 and fmt.get("format_name") not in ["image2", "png_pipe"]:
|
if fps < 1000 and fmt.get("format_name") not in ["image2", "png_pipe"]:
|
||||||
ret[".fps"] = round(fps, 3)
|
ret[".fps"] = round(fps, 3)
|
||||||
|
Loading…
Reference in New Issue
Block a user