ffmepeg下载合成视频
下载视频
def ffmepeg_download(url, path_name):
cmd = r'ffmpeg.exe -i %s -c copy %s.mp4' % (url , path_name)
print(cmd)
os.system(cmd)
本地合成m3u8视频
def ffmpge_merge(m3u8_file, output_file):
# .\ffmpeg.exe -i .\index.m3u8 -c copy -bsf:a aac_adtstoasc out.mp4
cmd = r'ffmpeg.exe -allowed_extensions ALL -i %s -c copy -bsf:a aac_adtstoasc %s' % (m3u8_file , output_file)
print(cmd)
os.system(cmd)