去除PROD_ENV依赖

This commit is contained in:
2022-04-27 07:40:23 +08:00
parent daeed748ff
commit ea2de8270b
3 changed files with 5 additions and 10 deletions

View File

@ -5,7 +5,7 @@ from datetime import datetime, timedelta
from typing import IO
from config import FFMPEG_EXEC, VIDEO_BITRATE, FFMPEG_USE_NVIDIA_GPU, VIDEO_CLIP_EACH_SEC, VIDEO_CLIP_OVERFLOW_SEC, \
PROD_ENV, FFMPEG_USE_INTEL_GPU
FFMPEG_USE_INTEL_GPU
def base_ts_to_filename(start_ts: float, is_mp4=False) -> str:
@ -161,12 +161,9 @@ def handle_ffmpeg_output(stderr: IO[bytes]) -> str:
break
if line.startswith(b"out_time="):
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().strip()
if not PROD_ENV:
print("Speed", speed)
print("Speed:", out_time, "@", speed)
return out_time