13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/video_transcoding/ffmpeg.rb', line 13
def setup
Tool.provide(COMMAND_NAME, ['-version']) do |output, status, properties|
fail "#{COMMAND_NAME} failed during execution" unless status == 0
unless output =~ /^ffmpeg version [^ ]+/
Console.debug output
fail "#{COMMAND_NAME} version unknown"
end
Console.info "#{$MATCH} found..."
if output =~ /--enable-libfdk-aac/
properties[:aac_encoder] = 'libfdk_aac'
else
properties[:aac_encoder] = 'aac'
end
end
end
|