From a25265e031cf7bf89267d2f09f220dd934c33b12 Mon Sep 17 00:00:00 2001 From: Somdev Sangwan Date: Mon, 29 May 2023 19:52:51 +0530 Subject: [PATCH] bruh moment 5, actually --- core/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/utils.py b/core/utils.py index 69cbe20..0ee9e9b 100644 --- a/core/utils.py +++ b/core/utils.py @@ -35,10 +35,10 @@ def extract_frames(input_path, output_dir): def add_audio(output_dir, target_path, keep_frames, output_file): video = target_path.split(sep)[-1] video_name = video.split(".")[0] - save_to = output_file if output_file else output_dir + "{sep}swapped-" + video_name + ".mp4" + save_to = output_file if output_file else output_dir + f"{sep}swapped-" + video_name + ".mp4" os.system(f'ffmpeg -i "{output_dir}{sep}output.mp4" -i "{output_dir}{sep}{video}" -c:v copy -map 0:v:0 -map 1:a:0 -y "{save_to}"') if not os.path.isfile(save_to): - shutil.move(output_dir + "{sep}output.mp4", save_to) + shutil.move(output_dir + f"{sep}output.mp4", save_to) if not keep_frames: shutil.rmtree(output_dir)