ffmpeg Script

#ffmpeg_script.py
  
import os.path
import os
import stat
  
#-------------------------------------------------------------------
def WIN_convert_seq_to_mpeg(parent_dir, bat_name, image_names, image_type):
    outf = open(os.path.join(parent_dir, bat_name), 'w')
    for name in image_names:
        outf.write('ffmpeg.exe -i ')
        outf.write('"%s/%s%s" ' % (parent_dir, name, image_type) )
        outf.write('-vcodec libx264 -crf 20 ')
        outf.write('"./COMPRESSED_%s.mp4"' % name)
        outf.write("\n")
        
    outf.write('pause')
    outf.close()
#-------------------------------------------------------------------