Last active
May 27, 2016 19:45
-
-
Save milothiesen/82b9abd2f4b12752fa2622f9819fa72a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#developed by Maile Thiesen | |
#dependencies are homebrew and mediainfo, use brew install mediainfo. | |
#!/usr/bin/ruby | |
library_path = ARGV[0] | |
files_list = %x[find #{library_path} -name "*.mov"].split("\n") | |
files_list.each do |filename| | |
#enter the duration you want to match to here--vvv# | |
match_duration = "26s 727ms\n" | |
filename.chomp! | |
mediainfo_output = %x[mediainfo '#{filename}'] | |
duration = %x[mediainfo --Inform="Video;%Duration/String%" '#{filename}'] | |
# puts filename + " DURATION = " + duration | |
if duration == match_duration | |
puts filename + " DURATION = " + duration + " IS A MATCH!!!!" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment