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.



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

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



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

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