Module: Abrizer::FilepathHelpers

Instance Method Summary collapse

Instance Method Details

#audio_filepathObject



3
4
5
# File 'lib/abrizer/filepath_helpers.rb', line 3

def audio_filepath
  File.join output_directory, "#{basename}-audio.m4a"
end

#audio_filepath_fragmentedObject



7
8
9
# File 'lib/abrizer/filepath_helpers.rb', line 7

def audio_filepath_fragmented
  File.join output_directory, "#{basename}-audio-frag.m4a"
end

#basenameObject

TODO: don’t assume all incoming files will be .mp4



32
33
34
35
# File 'lib/abrizer/filepath_helpers.rb', line 32

def basename
  extname = File.extname @filename
  File.basename @filename, extname
end

#canvas_filepathObject



85
86
87
# File 'lib/abrizer/filepath_helpers.rb', line 85

def canvas_filepath
  File.join output_directory, canvas_partial_filepath
end

#canvas_partial_filepathObject



81
82
83
# File 'lib/abrizer/filepath_helpers.rb', line 81

def canvas_partial_filepath
  'canvas.json'
end

#filename_directoryObject



27
28
29
# File 'lib/abrizer/filepath_helpers.rb', line 27

def filename_directory
  File.dirname @filename
end

#first_image_filepathObject



97
98
99
# File 'lib/abrizer/filepath_helpers.rb', line 97

def first_image_filepath
  File.join output_directory, 'sprites/images/img-00001.jpg'
end

#hlsts_aac_filepathObject



61
62
63
# File 'lib/abrizer/filepath_helpers.rb', line 61

def hlsts_aac_filepath
  File.join output_directory, hlsts_aac_partial_filepath
end

#hlsts_aac_partial_filepathObject



57
58
59
# File 'lib/abrizer/filepath_helpers.rb', line 57

def hlsts_aac_partial_filepath
  'hls/audio/aac/eng/media.aac'
end

#hlsts_filepathObject



53
54
55
# File 'lib/abrizer/filepath_helpers.rb', line 53

def hlsts_filepath
  File.join output_directory, hlsts_partial_filepath
end

#hlsts_partial_filepathObject



49
50
51
# File 'lib/abrizer/filepath_helpers.rb', line 49

def hlsts_partial_filepath
  'hls/master.m3u8'
end

#mp4_filepathObject



69
70
71
# File 'lib/abrizer/filepath_helpers.rb', line 69

def mp4_filepath
  File.join output_directory, mp4_partial_filepath
end

#mp4_partial_filepathObject



65
66
67
# File 'lib/abrizer/filepath_helpers.rb', line 65

def mp4_partial_filepath
  'progressive.mp4'
end

#mpd_filepathObject



45
46
47
# File 'lib/abrizer/filepath_helpers.rb', line 45

def mpd_filepath
  File.join output_directory, mpd_partial_filepath
end

#mpd_partial_filepathObject



41
42
43
# File 'lib/abrizer/filepath_helpers.rb', line 41

def mpd_partial_filepath
  'fmp4/stream.mpd'
end

#output_directoryObject



15
16
17
18
19
20
21
# File 'lib/abrizer/filepath_helpers.rb', line 15

def output_directory
  if @output_directory
    @output_directory
  else
    File.join filename_directory, basename
  end
end

#output_directory_basenameObject



23
24
25
# File 'lib/abrizer/filepath_helpers.rb', line 23

def output_directory_basename
  File.basename output_directory
end

#poster_image_filepathObject



101
102
103
# File 'lib/abrizer/filepath_helpers.rb', line 101

def poster_image_filepath
  File.join output_directory, 'poster.jpg'
end

#poster_partial_filepathObject



37
38
39
# File 'lib/abrizer/filepath_helpers.rb', line 37

def poster_partial_filepath
  'poster.jpg'
end

#sprites_filepathObject



93
94
95
# File 'lib/abrizer/filepath_helpers.rb', line 93

def sprites_filepath
  File.join output_directory, sprites_partial_filepath
end

#sprites_partial_filepathObject



89
90
91
# File 'lib/abrizer/filepath_helpers.rb', line 89

def sprites_partial_filepath
  'sprites/sprites.vtt'
end

#vp9_filepathObject



77
78
79
# File 'lib/abrizer/filepath_helpers.rb', line 77

def vp9_filepath
  File.join output_directory, vp9_partial_filepath
end

#vp9_partial_filepathObject



73
74
75
# File 'lib/abrizer/filepath_helpers.rb', line 73

def vp9_partial_filepath
  'progressive-vp9.webm'
end

#webvtt_input_filepathObject



11
12
13
# File 'lib/abrizer/filepath_helpers.rb', line 11

def webvtt_input_filepath
  File.join filename_directory, "#{basename}.vtt"
end