From 0787d2401439acf1e2ebfce6483b5d935ae3694b Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Thu, 2 Sep 2021 14:39:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=B2=E7=BB=8F=E8=BD=AC=E6=8D=A2=E4=BA=86?= =?UTF-8?q?=E7=9A=84=E4=B8=8D=E8=A6=81=E5=86=8D=E8=BD=AC=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- auto_convert_flv_to_mp4.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/auto_convert_flv_to_mp4.py b/auto_convert_flv_to_mp4.py index 848492f..fff77b9 100644 --- a/auto_convert_flv_to_mp4.py +++ b/auto_convert_flv_to_mp4.py @@ -4,8 +4,10 @@ import os for file in glob("*.flv"): new_file = file.replace(".flv", ".mp4") + if os.path.exists(new_file): + continue os.system(" ".join([ - "ffmpeg", "-i", file, + "ffmpeg", "-y", "-i", file, "-c copy", "-f mp4", new_file, ]))