Module: Hydra::Derivatives::Processors::Ffmpeg::ClassMethods

Defined in:
lib/hydra/derivatives/processors/ffmpeg.rb

Instance Method Summary collapse

Instance Method Details

#encode(path, options, output_file) ⇒ Object



14
15
16
17
18
# File 'lib/hydra/derivatives/processors/ffmpeg.rb', line 14

def encode(path, options, output_file)
  inopts = options[INPUT_OPTIONS] ||= "-y"
  outopts = options[OUTPUT_OPTIONS] ||= ""
  execute "#{Hydra::Derivatives.ffmpeg_path} #{inopts} -i #{Shellwords.escape(path)} #{outopts} #{output_file}"
end