-
-
Save karthik101/8f773e37e8aa33d05525df90f2047b92 to your computer and use it in GitHub Desktop.
Revisions
-
jdye64 created this gist
Jun 23, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ #!/usr/bin/python print "Converting all of the .dav files in this current directory into .mp4 files using ffmpeg" import os from subprocess import call files = [f for f in os.listdir('.') if os.path.isfile(f)] for f in files: ext = f.split(".")[-1] if ext == "dav" or ext == "DAV": mp4Name = f.replace("dav", "mp4") print "Converting: " + f call(['ffmpeg', '-y', '-i', f, "-vcodec", "libx264", "-crf", "24", mp4Name]) print "Converted: " + f