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



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

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