Mercurial > codedump
diff intro.py @ 40:2aa9614cb39a
flake8
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Mon, 21 Jun 2021 15:16:15 -0400 |
parents | 0f81a012ead6 |
children | 37f231f85a67 |
line wrap: on
line diff
--- a/intro.py Mon Jun 21 13:58:31 2021 -0400 +++ b/intro.py Mon Jun 21 15:16:15 2021 -0400 @@ -1,9 +1,12 @@ -import os - -amt = 1 -for files in os.walk("./"): - for file in files: - ext = os.path.splitext(file)[-1].lower() - if ext == ".mkv": - os.system(f'ffmpeg -i "{file}" -t 30 -pix_fmt yuv420p "Clips\intro_{amt}.mp4') - amt += 1 +import os +import ffmpeg + +amt = 1 +for files in os.walk("./"): + for file in files: + ext = os.path.splitext(file)[-1].lower() + if ext == ".mkv": + stream = ffmpeg.input(file) + os.system( + f'ffmpeg -i "{file}" -t 30 -pix_fmt yuv420p "Clips\intro_{amt}.mp4') + amt += 1