From 1bcbdd19948f71d1c1268b1aec6ddfa0d6ca5c98 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Mon, 2 May 2022 11:46:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=8F=E5=B0=91=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- workflow/video.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/workflow/video.py b/workflow/video.py index 47b1d78..02dae47 100644 --- a/workflow/video.py +++ b/workflow/video.py @@ -157,6 +157,8 @@ def encode_video_with_subtitles(orig_filename: str, subtitles: list[str], new_fi def handle_ffmpeg_output(stderr: IO[bytes]) -> str: out_time = "0:0:0.0" + speed = "0" + _i = 0 while True: line = stderr.readline() if line == b"": @@ -168,8 +170,10 @@ def handle_ffmpeg_output(stderr: IO[bytes]) -> str: out_time = line.replace(b"out_time=", b"").decode().strip() if line.startswith(b"speed="): speed = line.replace(b"speed=", b"").decode().strip() - print("Speed:", out_time, "@", speed) - + _i += 1 + if _i % 60 == 30: + print("[>]Speed:", out_time, "@", speed) + print("[ ]Speed:", out_time, "@", speed) return out_time