Class: Abrizer::All

Inherits:
Object
  • Object
show all
Defined in:
lib/abrizer/all.rb

Instance Method Summary collapse

Constructor Details

#initialize(filename, output_dir, base_url, vp9 = false) ⇒ All

Returns a new instance of All.



4
5
6
7
8
9
10
# File 'lib/abrizer/all.rb', line 4

def initialize(filename, output_dir, base_url, vp9=false)
  @filename = filename
  @output_directory = output_dir
  FileUtils.mkdir_p @output_directory
  @base_url = base_url
  @vp9 = vp9
end

Instance Method Details

#runObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/abrizer/all.rb', line 12

def run
  Abrizer::FfprobeFile.new(@filename, @output_directory).run
  Abrizer::AdaptationsFile.new(nil, @output_directory).adaptations
  Abrizer::Captions.new(@filename, @output_directory).copy
  Abrizer::ProgressiveVp9.new(@filename, @output_directory).create if @vp9
  Abrizer::ProgressiveMp3.new(@filename, @output_directory).create
  Abrizer::Sprites.new(@filename, @output_directory).create
  Abrizer::TemporaryPoster.new(@output_directory).copy
  Abrizer::Processor.process(@filename, @output_directory)
  Abrizer::ProgressiveMp4.new(@output_directory).create
  Abrizer::PackageDashBento.new(@output_directory).package
  Abrizer::PackageHlsBento.new(@output_directory).package
  Abrizer::Canvas.new(nil, @output_directory, @base_url).create
  Abrizer::Data.new(nil, @output_directory, @base_url).create
  Abrizer::Cleaner.new(@output_directory).clean
end