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.



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

def ffmpeg_output
  @ffmpeg_output
end

Instance Method Details

#capture_outputObject



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

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)


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

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