Class: Hydra::Derivatives::CapabilityService

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#ffmpeg_outputObject

Returns the value of attribute ffmpeg_output


5
6
7
# File 'lib/hydra/derivatives/services/capability_service.rb', line 5

def ffmpeg_output
  @ffmpeg_output
end

Instance Method Details

#capture_outputObject


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

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

#fdk_aac?Boolean

Returns:

  • (Boolean)

13
14
15
# File 'lib/hydra/derivatives/services/capability_service.rb', line 13

def fdk_aac?
  @ffmpeg_output.include?('--enable-libfdk-aac') || @ffmpeg_output.include?('--with-fdk-aac')
end