Created
December 19, 2017 02:03
-
-
Save wermarter/dce55075275d93baf8f6093c9b2717e9 to your computer and use it in GitHub Desktop.
Using FFMPEG to recode to 480p from text file contains list of dir
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from TheFetchers.TheCommons import filename_check | |
with open(input('> '), 'r') as f: | |
files = [i.strip() for i in f.readlines()] | |
for file in files: | |
fn = os.path.splitext(file)[0]+'.mp4' | |
output_file = filename_check(fn, True) | |
cmd = "ffmpeg -i \"%s\" -vf scale=-2:480 -c:v libx264 \"%s\"" % (file, output_file) | |
os.system(cmd) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment