Skip to content

Instantly share code, notes, and snippets.

@georgismitev
Last active August 29, 2015 14:02
Show Gist options
  • Save georgismitev/6615859784cc6fa04b37 to your computer and use it in GitHub Desktop.
Save georgismitev/6615859784cc6fa04b37 to your computer and use it in GitHub Desktop.
umgi_dir = "/Volumes/OS/interlaced"
files = Dir.glob("#{umgi_dir}/**/*.mp4")
files.each do |f|
ffmpeg_command = "ffmpeg -filter:v idet -frames:v 100 -an -f rawvideo -y /dev/null -i #{f} 2>&1 | awk -F 'detection: ' '/detection/ { print $2 }'"
result_lines = `#{ffmpeg_command}`.split("\n")
puts [f].concat(result_lines).join("\t")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment