package require mawt

catch { file mkdir "TestOut" }

set movieFile [file join "Data" "Face2.avi"]
set imgFiles  [file join "TestOut" "Face.%03d.png"]

puts "MAWT version      : [mawt GetVersion]"
puts "FFmpeg version    : [mawt GetFfmpegVersion]"
puts "Movie file        : $movieFile"
puts "Image file pattern: $imgFiles"

set t1 [clock microseconds]
set numExportedImgs [mawt VideoExport $movieFile $imgFiles -end 50]
set t2 [clock microseconds]

puts "Number of images  : $numExportedImgs"
puts [format "Time needed       : %.2f seconds" [expr ($t2 - $t1) / 1E6]]

exit
