- call:可以运行系统命令。如:
retcode = call(["ls", "-l"])
Run command with arguments. Wait for command to complete or timeout, then return the return code attribute. The arguments are the same as for the Popen constructor.
from subprocess import call
src = train_or_test + '/' + classname + '/' + filename
dest = train_or_test + '/' + classname + '/' + filename_no_ext + '-%04d.jpg'
call(["ffmpeg", "-i", src, dest])