python合并所有的ts,带密钥【四】

import os

wenjian = input("请输入文件名:")
mingcheng = input ("请输入合并后Mp4名称:")
t= r'start /d "D:\Study\pythonProject\Python_down_m3u8\xiazaiqi\%s" ffmpeg -f concat -safe 0 -i s.txt -c copy %s.mp4' %(wenjian,mingcheng)
print(t)
with open('2.bat','w') as f:
    f.write(t)
    f.close()
os.startfile("2.bat")

电脑先下载ffmpeg,并加入环境变量。

posted @ 2020-12-08 16:17  凹凸曼大人  阅读(350)  评论(0)    收藏  举报