Guest User

Untitled

a guest
Jul 20th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. #!/usr/bin/env ruby
  2. require 'pathname'
  3.  
  4. ARGV.each do |input|
  5. pathname = Pathname(input)
  6. output = pathname.sub_ext(pathname.extname == ".mp4" ? ".m4a" : ".mp3").to_s
  7. system("ffmpeg", "-vn", "-acodec", "copy", "-i", input, output)
  8. end
Add Comment
Please, Sign In to add comment