Created
May 18, 2020 21:58
-
-
Save victusfate/5a36b2c9ecf816d289c090e04f6a04e2 to your computer and use it in GitHub Desktop.
shrink some videos
This file contains hidden or 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
files = Dir.glob("*.mp4") + Dir.glob("*.m4v") + Dir.glob("large/*.mp4") + Dir.glob("large/*.m4v") | |
puts files | |
files.each do |file| | |
basename = File.basename(file).gsub(/[^0-9a-z.]/i, '') | |
# puts basename | |
system("ffmpeg -y -i #{file} -ss 2 -t 60 shrunk/sampled_#{basename}") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment