diff --git a/workflow/video.py b/workflow/video.py index 2636f80..546d2d2 100644 --- a/workflow/video.py +++ b/workflow/video.py @@ -38,16 +38,14 @@ def handle_ffmpeg_output(stderr: IO[bytes]) -> str: if line.strip() == b"progress=end": # 处理完毕 break - if PROD_ENV: - # 正式环境不要输出一大堆的东西了 - continue if line.startswith(b"out_time="): - cur_time = line.replace(b"out_time=", b"").decode() - print("CurTime", cur_time.strip()) - out_time = cur_time.strip() + out_time = line.replace(b"out_time=", b"").decode().strip() + if not PROD_ENV: + print("CurTime", out_time) if line.startswith(b"speed="): - speed = line.replace(b"speed=", b"").decode() - print("Speed", speed.strip()) + speed = line.replace(b"speed=", b"").decode().strip() + if not PROD_ENV: + print("Speed", speed) return out_time