You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
521 B

import glob
import sys
import subprocess
import os
path = sys.argv[1]
fn_stem = sys.argv[2]
files = glob.glob(f"{path}/3-wavs/output-???.wav")
files.sort()
print(files)
with open(f"./{path}/inputs-{fn_stem}.txt", "w") as f:
for file in files:
base_file = os.path.basename(file)
f.write(f"file 3-wavs/{base_file}'\n")
f.flush()
subprocess.run([
"ffmpeg",
"-f", "concat",
"-safe", "0",
"-i", f"./{path}/inputs-{fn_stem}.txt",
"-c", "copy", f"./{path}/{fn_stem}.wav",
])