Module: Abrizer::FilepathHelpers

Instance Method Summary collapse

Instance Method Details

#adaptations_filepathObject



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

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

#all_media_pathsObject



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

def all_media_paths
  [mpd_filepath, hlsts_filepath, vp9_filepath, mp4_filepath, captions_filepath, sprites_filepath]
end

#audio_filepathObject



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

def audio_filepath
  File.join output_directory, "adaptation-audio.m4a"
end

#audio_filepath_fragmentedObject



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

def audio_filepath_fragmented
  File.join output_directory, "adaptation-audio-frag.m4a"
end

#basenameObject

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



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

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

#canvas_filepathObject



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

def canvas_filepath
  File.join output_directory, canvas_partial_filepath
end

#canvas_partial_filepathObject



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

def canvas_partial_filepath
  'canvas.json'
end

#captions_filepathObject



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

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

#data_filepathObject



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

def data_filepath
  File.join output_directory, data_partial_filepath
end

#data_partial_filepathObject



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

def data_partial_filepath
  'data.json'
end

#ffprobe_filepathObject



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

def ffprobe_filepath
  File.join output_directory, 'ffprobe.json'
end

#filename_directoryObject



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

def filename_directory
  File.dirname @filename
end

#first_image_filepathObject



136
137
138
# File 'lib/abrizer/filepath_helpers.rb', line 136

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

#hlsts_aac_filepathObject



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

def hlsts_aac_filepath
  File.join output_directory, hlsts_aac_partial_filepath
end

#hlsts_aac_partial_filepathObject



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

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

#hlsts_filepathObject



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

def hlsts_filepath
  File.join output_directory, hlsts_partial_filepath
end

#hlsts_partial_filepathObject



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

def hlsts_partial_filepath
  'hls/master.m3u8'
end

#mp3_filepathObject



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

def mp3_filepath
  File.join output_directory, mp3_partial_filepath
end

#mp3_partial_filepathObject



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

def mp3_partial_filepath
  'progressive.mp3'
end

#mp4_filepathObject



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

def mp4_filepath
  File.join output_directory, mp4_partial_filepath
end

#mp4_partial_filepathObject



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

def mp4_partial_filepath
  'progressive.mp4'
end

#mpd_filepathObject



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

def mpd_filepath
  File.join output_directory, mpd_partial_filepath
end

#mpd_partial_filepathObject



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

def mpd_partial_filepath
  'fmp4/stream.mpd'
end

#output_directoryObject



22
23
24
25
26
27
28
# File 'lib/abrizer/filepath_helpers.rb', line 22

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

#output_directory_basenameObject



30
31
32
# File 'lib/abrizer/filepath_helpers.rb', line 30

def output_directory_basename
  File.basename output_directory
end

#poster_filepathObject



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

def poster_filepath
  File.join output_directory, poster_partial_filepath
end

#poster_image_filepathObject



140
141
142
# File 'lib/abrizer/filepath_helpers.rb', line 140

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

#poster_partial_filepathObject



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

def poster_partial_filepath
  'poster.jpg'
end

#sprites_filepathObject



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

def sprites_filepath
  File.join output_directory, sprites_partial_filepath
end

#sprites_partial_filepathObject



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

def sprites_partial_filepath
  'sprites/sprites.vtt'
end

#vp9_filepathObject



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

def vp9_filepath
  File.join output_directory, vp9_partial_filepath
end

#vp9_partial_filepathObject



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

def vp9_partial_filepath
  'progressive-vp9.webm'
end

#webvtt_input_filepathObject

TODO: webvtt_input_filepath should look multiple places in case vtt file(s) already copied over.



18
19
20
# File 'lib/abrizer/filepath_helpers.rb', line 18

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