Created
March 14, 2013 05:27
-
-
Save venj/5159037 to your computer and use it in GitHub Desktop.
Convert videos (mjpeg) shot with Canon Powershot to m4v(h264).
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'colorize' | |
require 'shellwords' | |
Dir["*"].each do |f| | |
next if f == File.basename(__FILE__) | |
fname = File.basename(f.downcase, '.avi') | |
print "Encoding #{f}..." | |
system("ffmpeg -v error -i #{f.shellescape} -map_metadata 0:g -acodec libfaac -ab 256 -ar 44100 -ac 1 -c:v h264 #{fname}.m4v") | |
puts "done.".green | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment