1
2
3
4
5
6
7
8
9
10
11
12
13
| #!/usr/bin/python
import glob
import os
t=glob.glob("*.avi" ) # search all AVI files
for v in t:
vv = os.path.splitext(v)[0];
os.makedirs( vv ) # make a directory for each input file
pathDst = os.path.join( vv, "%05d.png" ) # deststination path
os.system("ffmpeg -i {0} {1}".format( v, pathDst ) )
|