Sha256: 0d68d3b795cbf6f683ff577500cee1ecc212e1148b9deb260074292e83646e40
Contents?: true
Size: 591 Bytes
Versions: 7
Compression:
Stored size: 591 Bytes
Contents
# An abstract class for asyncronous jobs that transcode files using FFMpeg module Hydra::Derivatives::Processors module Ffmpeg extend ActiveSupport::Concern INPUT_OPTIONS=:input_options OUTPUT_OPTIONS=:output_options included do include ShellBasedProcessor end module ClassMethods def encode(path, options, output_file) inopts = options[INPUT_OPTIONS] ||= "-y" outopts = options[OUTPUT_OPTIONS] ||= "" execute "#{Hydra::Derivatives.ffmpeg_path} #{inopts} -i \"#{path}\" #{outopts} #{output_file}" end end end end
Version data entries
7 entries across 7 versions & 1 rubygems