diff --git a/test/merge.py b/test/merge.py new file mode 100644 index 0000000..9e63bf4 --- /dev/null +++ b/test/merge.py @@ -0,0 +1,21 @@ +import subprocess +import os + +ffmpeg_path = "ffmpeg" + +cmd = f"{ffmpeg_path} -y -loglevel error -f concat -safe 0 -i %s -c copy test.mp4" + +tmp_merge_file = "merge.tmp" +with open(tmp_merge_file, mode="w", encoding="utf8") as f: + f.write("file './72439149X00E26C681B09_20240311000015_20240311000030.mp4'\n") + # f.write("file ./72439149X00E26C681B09_20240311001015_20240311001030.mp4") + +proc = subprocess.Popen( + cmd % tmp_merge_file, + stdin=subprocess.PIPE, + stdout=None, + shell=True +) + +proc.communicate() +os.remove(tmp_merge_file) \ No newline at end of file