Skip to content

Instantly share code, notes, and snippets.

@JasonSpine
Created January 23, 2017 09:06
Show Gist options
  • Save JasonSpine/5d85fe6c47a9600ce874f5be368522ac to your computer and use it in GitHub Desktop.
Save JasonSpine/5d85fe6c47a9600ce874f5be368522ac to your computer and use it in GitHub Desktop.
Convert HD Camcorder *.MTS films with avconv
# -*- coding: utf-8 -*-
import os
path = './'
listing = os.listdir(path)
for infile in listing:
s=os.getcwd()+'/'+infile.split('.MTS')[0]
command="""avconv -i '%s.MTS' -r 30 -vcodec mpeg4 -acodec libmp3lame\
-s hd720 -filter:v yadif\
-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