DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Use Ffmpeg To Convert Flv To Mp4(or Avi)
you should have your ffmpeg path into the environment variables first.
import os from re import match path='E:\\blender tutorials\\' #you should change the directory before you run this code. files=os.listdir(path) for f in files: if match('.+\.flv$',f): outf=f.replace('.flv','.mp4') #change mp4 to avi if you want avi files. os.system(r'ffmpeg.exe -i "%s" "%s"'%(path+f,path+outf))