Skip to content

Instantly share code, notes, and snippets.

@LogicWolfe
Created March 14, 2010 18:44
Show Gist options
  • Save LogicWolfe/332148 to your computer and use it in GitHub Desktop.
Save LogicWolfe/332148 to your computer and use it in GitHub Desktop.
files = `ls`
files = files.split("\n")
files.each {|file|
next if (file !~ /\.(mkv|avi)/)
jpg_name = file.gsub(/\.(mkv|avi)/, '.jpg')
puts "ffmpeg -i \"#{file}\" -f mjpeg -t 0.001 -ss 180 -y \"#{jpg_name}\""
puts `ffmpeg -i \"#{file}\" -f mjpeg -t 0.001 -ss 180 -y \"#{jpg_name}\"`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment