Over a million developers have joined DZone.

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.
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))

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}