Last active
August 29, 2015 14:02
-
-
Save anaglik/71e87bcf07f66b07b8ef to your computer and use it in GitHub Desktop.
Handy script for converting videos using HandBrakeCLI.
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
DIRECTORY = "/videos/" | |
Dir.foreach(DIRECTORY) { |file| | |
next if !file.end_with?(".mov") | |
new_file = file.sub(".mov",".mp4") | |
puts "converting #{file} into #{new_file} ... \n" | |
%x{HandBrakeCLI -Z HigherProfile --strict-anamorphic --crop "0:0:0:0" -i "#{DIRECTORY}#{file}" -o "#{DIRECTORY}#{new_file}" } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment