Use Ffmpeg To Convert Flv To Mp4(or Avi)
Join the DZone community and get the full member experience.Join For Free
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))
Opinions expressed by DZone contributors are their own.