From 22b3ea847ffe0c43982dda860afb3988d282e914 Mon Sep 17 00:00:00 2001 From: Zen <46526140+master-of-zen@users.noreply.github.com> Date: Sun, 12 Jan 2020 14:14:41 +0200 Subject: [PATCH] temporally removed audio check --- av1an.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/av1an.py b/av1an.py index 6197964..725846e 100755 --- a/av1an.py +++ b/av1an.py @@ -160,8 +160,17 @@ def concatenate_video(input_video): for file in sorted(files): f.write(f"file '{join(root, file)}'\n") - concat = join(os.getcwd(), ".temp", "concat.txt") - audio = join(os.getcwd(), ".temp", "audio.mkv") + concat = join(here, ".temp", "concat.txt") + ''' + # original video don't have audio + if os.path.isfile(join(here, 'temp', 'audio.mkv')): + print('Audio here') + + else: + print('No audio') + audio = '' + ''' + audio = f'-i {join(here, ".temp", "audio.mkv")}' output = f'{input_video.split(".")[0]}_av1.mkv' cmd = f'{FFMPEG} -f concat -safe 0 -i {concat} -i {audio} -c copy -y {output}' Popen(cmd, shell=True).wait()