Created
January 23, 2017 09:07
-
-
Save JasonSpine/b99ebe165c1be2be769f2322e659b244 to your computer and use it in GitHub Desktop.
Convert HD Camcorder *.MTS films with FFmpeg
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
import os | |
path = './' | |
listing = os.listdir(path) | |
for infile in listing: | |
s=os.getcwd()+'/'+infile.split('.MTS')[0] | |
command="""ffmpeg -i '%s.MTS' -r 30 -vcodec mpeg4 -acodec libmp3lame\ | |
-sws_flags lanczos -vf 'scale=1280:720:interl=1' -aspect 16:9\ | |
-threads 4 -vb 8000k -ab 320k '%s.avi'"""%(s,s) | |
os.system(command) | |
print "done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment