Untitled
unknown
python
a month ago
592 B
12
Indexable
Never
def merge_ts_files(self): os.chdir("./tmpTS") file_list = sorted(os.listdir("./"), key=len) with open("./all.txt", "w+") as f: for file in file_list: if file.endswith(".ts") and not file.startswith("output"): f.write(f"file {file}\n") print(os.getcwd()) command = "ffmpeg -err_detect ignore_err -f concat -i ./all.txt -c copy ./output.mp4" # command = f"ffmpeg -f concat -i ./all.txt -c:v libsvtav1 -preset 7 -crf 24 ./output.mp4" print(command) os.system(command)
Leave a Comment