Module: Abrizer::FilepathHelpers

Instance Method Summary collapse

Instance Method Details

#adaptations_filepathObject



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

def adaptations_filepath
  File.join output_directory, 'adaptations.json'
end

#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



109
110
111
# File 'lib/abrizer/filepath_helpers.rb', line 109

def canvas_filepath
  File.join output_directory, canvas_partial_filepath
end

#canvas_partial_filepathObject



105
106
107
# File 'lib/abrizer/filepath_helpers.rb', line 105

def canvas_partial_filepath
  'canvas.json'
end

#captions_filepathObject



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

def captions_filepath
  File.join output_directory, 'vtt/captions.vtt'
end

#data_filepathObject



117
118
119
# File 'lib/abrizer/filepath_helpers.rb', line 117

def data_filepath
  File.join output_directory, data_partial_filepath
end

#data_partial_filepathObject



113
114
115
# File 'lib/abrizer/filepath_helpers.rb', line 113

def data_partial_filepath
  'data.json'
end

#ffprobe_filepathObject



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

def ffprobe_filepath
  File.join output_directory, 'ffprobe.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



129
130
131
# File 'lib/abrizer/filepath_helpers.rb', line 129

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

#hlsts_aac_filepathObject



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

def hlsts_aac_filepath
  File.join output_directory, hlsts_aac_partial_filepath
end

#hlsts_aac_partial_filepathObject



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

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

#hlsts_filepathObject



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

def hlsts_filepath
  File.join output_directory, hlsts_partial_filepath
end

#hlsts_partial_filepathObject



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

def hlsts_partial_filepath
  'hls/master.m3u8'
end

#mp3_filepathObject



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

def mp3_filepath
  File.join output_directory, mp3_partial_filepath
end

#mp3_partial_filepathObject



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

def mp3_partial_filepath
  'progressive.mp3'
end

#mp4_filepathObject



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

def mp4_filepath
  File.join output_directory, mp4_partial_filepath
end

#mp4_partial_filepathObject



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

def mp4_partial_filepath
  'progressive.mp4'
end

#mpd_filepathObject



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

def mpd_filepath
  File.join output_directory, mpd_partial_filepath
end

#mpd_partial_filepathObject



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

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_filepathObject



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

def poster_filepath
  File.join output_directory, poster_partial_filepath
end

#poster_image_filepathObject



133
134
135
# File 'lib/abrizer/filepath_helpers.rb', line 133

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

#poster_partial_filepathObject



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

def poster_partial_filepath
  'poster.jpg'
end

#sprites_filepathObject



125
126
127
# File 'lib/abrizer/filepath_helpers.rb', line 125

def sprites_filepath
  File.join output_directory, sprites_partial_filepath
end

#sprites_partial_filepathObject



121
122
123
# File 'lib/abrizer/filepath_helpers.rb', line 121

def sprites_partial_filepath
  'sprites/sprites.vtt'
end

#vp9_filepathObject



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

def vp9_filepath
  File.join output_directory, vp9_partial_filepath
end

#vp9_partial_filepathObject



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

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