you are here: codestackercodes [RSS][ffmpeg] batch screenshot generator from flv

[ffmpeg] batch screenshot generator from flv

path = "."
videos = Dir["#{path}/*.flv"]
videos.each do |f|
  puts "converting #{f}"
  newFile = f.gsub(".flv", ".jpg")
  system("ffmpeg -itsoffset -4 -i #{f} -vframes 1 -an -f mjpeg -s 320x240 #{newFile}")
end

Comments