Class: Hydra::Derivatives::AudioEncoder

Inherits:
Object
  • Object
show all
Defined in:
lib/hydra/derivatives/audio_encoder.rb

Instance Method Summary collapse

Constructor Details

#initializeAudioEncoder

Returns a new instance of AudioEncoder.



6
7
8
9
10
11
# File 'lib/hydra/derivatives/audio_encoder.rb', line 6

def initialize
  @ffmpeg_output = Open3.capture3('ffmpeg -codecs').to_s
rescue StandardError
  Logger.warn('Unable to find ffmpeg')
  @ffmpeg_output = ""
end

Instance Method Details

#audio_encoderObject



13
14
15
16
17
18
19
20
# File 'lib/hydra/derivatives/audio_encoder.rb', line 13

def audio_encoder
  audio_encoder = if fdk_aac?
                    'libfdk_aac'
                  else
                    'aac'
                  end
  audio_encoder
end