fix output dir
This commit is contained in:
parent
4e0b456a4a
commit
1326df0f45
@ -45,7 +45,7 @@ def extract_frames(input_path, output_dir):
|
|||||||
|
|
||||||
|
|
||||||
def add_audio(output_dir, target_path, video, keep_frames, output_file):
|
def add_audio(output_dir, target_path, video, keep_frames, output_file):
|
||||||
video_name = video.split(".")[0]
|
video_name = os.path.splitext(video)[0]
|
||||||
save_to = output_file if output_file else output_dir + "/swapped-" + video_name + ".mp4"
|
save_to = output_file if output_file else output_dir + "/swapped-" + video_name + ".mp4"
|
||||||
save_to_ff, output_dir_ff = path(save_to), path(output_dir)
|
save_to_ff, output_dir_ff = path(save_to), path(output_dir)
|
||||||
os.system(f'ffmpeg -i "{output_dir_ff}{sep}output.mp4" -i "{output_dir_ff}{sep}{video}" -c:v copy -map 0:v:0 -map 1:a:0 -y "{save_to_ff}"')
|
os.system(f'ffmpeg -i "{output_dir_ff}{sep}output.mp4" -i "{output_dir_ff}{sep}{video}" -c:v copy -map 0:v:0 -map 1:a:0 -y "{save_to_ff}"')
|
||||||
|
Loading…
Reference in New Issue
Block a user