python把ts文件合并成MP4失败,怎么弄??
def merge_ts():
lst = []
with open("video/Homemade Christmas.m3u8", mode="r", encoding="utf-8") as f:
for line in f:
if line.startswith("#"):
continue
line = line.strip()
lst.append(f"video/{line}")
s = "+".join(lst)
os.system(f"copy /b {s} Homemade Christmas.mp4")
print("搞定!!!")