Skip to content

Instantly share code, notes, and snippets.

@bchase
Last active August 29, 2015 14:24
Show Gist options
  • Select an option

  • Save bchase/0d868b6d326e7396fe03 to your computer and use it in GitHub Desktop.

Select an option

Save bchase/0d868b6d326e7396fe03 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'pathname'
input = Pathname.new ARGV[0]
output = input.basename.to_s.chomp(input.extname) + '.mp3'
%x[avconv -i #{input.to_s.inspect} -ab 192k #{output.inspect}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment