Class: R2mp3::Converter

Inherits:
Object
  • Object
show all
Defined in:
lib/r2mp3/converter.rb

Instance Method Summary collapse

Instance Method Details

#run!Object



4
5
6
7
8
9
10
11
12
# File 'lib/r2mp3/converter.rb', line 4

def run!
  command = "#{R2mp3::FFMPEG} -i #{input_file} -acodec libmp3lame -ab #{bitrate}k #{output_file}"

  result, err, s = Open3.capture3(command)
  return if s.success?

  print err
  nil
end