From 05a804739f9df06cc1b29f95b2b7f257109c6ef0 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Tue, 31 May 2022 16:50:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- workflow/video.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/workflow/video.py b/workflow/video.py index 688ded8..5f82218 100644 --- a/workflow/video.py +++ b/workflow/video.py @@ -24,7 +24,7 @@ def get_video_real_duration(filename): def encode_video_with_subtitles(orig_filename: str, subtitles: list[str], base_ts: float): - new_filename = base_ts_to_filename(base_ts, True) + new_filename = base_ts_to_filename(base_ts, False) new_fullpath = os.path.join(VIDEO_OUTPUT_DIR, new_filename) if FFMPEG_USE_NVIDIA_GPU: process = get_encode_process_use_nvenc(orig_filename, subtitles, new_fullpath) @@ -114,6 +114,8 @@ def handle_ffmpeg_output(stdout: IO[bytes]) -> str: if line.startswith(b"speed="): speed = line.replace(b"speed=", b"").decode().strip() _i += 1 + if _i % 600 == 500: + print("[>]Speed:", out_time, "@", speed) print("[ ]Speed:", out_time, "@", speed) return out_time