Skip to content

Instantly share code, notes, and snippets.

@elight
Created June 2, 2009 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elight/122357 to your computer and use it in GitHub Desktop.
Save elight/122357 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
# A little hack that I threw together to help me bulk transcode content for our Apple TVs.
while !ARGV.empty?
infile = ARGV.shift
outfile = infile[0..-5] + ".mp4"
cmd = "mencoder -profile appletv-mod \"#{infile}\" -o \"/home/evan/Desktop/Drobo/Movies/#{outfile}\""
puts cmd
t0 = Time.now
puts "Encoding #{outfile}"
`#{cmd}`
puts "Encoded #{outfile} in #{Time.now - t0} seconds"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment