From 7999e76499480b4a0c0b38d1d97e5eedfe4fdb19 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Tue, 26 Apr 2022 17:38:39 +0800 Subject: [PATCH] =?UTF-8?q?FFMPEG=E5=91=BD=E4=BB=A4=E6=9B=BF=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- workflow/video.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow/video.py b/workflow/video.py index 1ec71d3..8739b0d 100644 --- a/workflow/video.py +++ b/workflow/video.py @@ -9,7 +9,7 @@ from config import FFMPEG_EXEC, VIDEO_BITRATE, FFMPEG_USE_NVIDIA_GPU, VIDEO_CLIP def get_video_real_duration(filename): ffmpeg_process = subprocess.Popen([ - "ffmpeg", "-hide_banner", "-progress", "-", "-v", "0", "-i", filename, "-c", "copy", "-f", "null", "-" + FFMPEG_EXEC, "-hide_banner", "-progress", "-", "-v", "0", "-i", filename, "-c", "copy", "-f", "null", "-" ], stdout=subprocess.PIPE) return handle_ffmpeg_output(ffmpeg_process.stdout) @@ -98,7 +98,7 @@ def quick_split_video(file): print("CUR_DT", current_dt) print("BIAS_T", current_sec) split_process = subprocess.Popen([ - "ffmpeg", "-y", "-hide_banner", "-progress", "-", "-v", "0", + FFMPEG_EXEC, "-y", "-hide_banner", "-progress", "-", "-v", "0", "-ss", str(current_sec), "-i", file_name, "-c", "copy", "-f", "mp4", "-t", str(VIDEO_CLIP_EACH_SEC + VIDEO_CLIP_OVERFLOW_SEC),