Module: Abrizer::FilepathHelpers
- Included in:
- Adaptation, AdaptationsFile, Canvas, Captions, Cleaner, Data, FfmpegProcessor, FfprobeFile, FfprobeInformer, PackageDashBento, PackageDashShaka, PackageHlsBento, PackageHlsShaka, ProgressiveMp3, ProgressiveMp4, ProgressiveVp9, TemporaryPoster
- Defined in:
- lib/abrizer/filepath_helpers.rb
Instance Method Summary collapse
- #adaptations_filepath ⇒ Object
- #all_media_paths ⇒ Object
- #audio_filepath ⇒ Object
- #audio_filepath_fragmented ⇒ Object
-
#basename ⇒ Object
TODO: don’t assume all incoming files will be .mp4.
- #canvas_filepath ⇒ Object
- #canvas_partial_filepath ⇒ Object
- #captions_filepath ⇒ Object
- #data_filepath ⇒ Object
- #data_partial_filepath ⇒ Object
- #ffprobe_filepath ⇒ Object
- #filename_directory ⇒ Object
- #first_image_filepath ⇒ Object
- #hlsts_aac_filepath ⇒ Object
- #hlsts_aac_partial_filepath ⇒ Object
- #hlsts_filepath ⇒ Object
- #hlsts_partial_filepath ⇒ Object
- #mp3_filepath ⇒ Object
- #mp3_partial_filepath ⇒ Object
- #mp4_filepath ⇒ Object
- #mp4_partial_filepath ⇒ Object
- #mpd_filepath ⇒ Object
- #mpd_partial_filepath ⇒ Object
- #output_directory ⇒ Object
- #output_directory_basename ⇒ Object
- #poster_filepath ⇒ Object
- #poster_image_filepath ⇒ Object
- #poster_partial_filepath ⇒ Object
- #sprites_filepath ⇒ Object
- #sprites_partial_filepath ⇒ Object
- #vp9_filepath ⇒ Object
- #vp9_partial_filepath ⇒ Object
-
#webvtt_input_filepath ⇒ Object
TODO: webvtt_input_filepath should look multiple places in case vtt file(s) already copied over.
Instance Method Details
#adaptations_filepath ⇒ Object
48 49 50 |
# File 'lib/abrizer/filepath_helpers.rb', line 48 def adaptations_filepath File.join output_directory, 'adaptations.json' end |
#all_media_paths ⇒ Object
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_filepath ⇒ Object
8 9 10 |
# File 'lib/abrizer/filepath_helpers.rb', line 8 def audio_filepath File.join output_directory, "adaptation-audio.m4a" end |
#audio_filepath_fragmented ⇒ Object
12 13 14 |
# File 'lib/abrizer/filepath_helpers.rb', line 12 def audio_filepath_fragmented File.join output_directory, "adaptation-audio-frag.m4a" end |
#basename ⇒ Object
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_filepath ⇒ Object
116 117 118 |
# File 'lib/abrizer/filepath_helpers.rb', line 116 def canvas_filepath File.join output_directory, canvas_partial_filepath end |
#canvas_partial_filepath ⇒ Object
112 113 114 |
# File 'lib/abrizer/filepath_helpers.rb', line 112 def canvas_partial_filepath 'canvas.json' end |
#captions_filepath ⇒ Object
108 109 110 |
# File 'lib/abrizer/filepath_helpers.rb', line 108 def captions_filepath File.join output_directory, 'vtt/captions.vtt' end |
#data_filepath ⇒ Object
124 125 126 |
# File 'lib/abrizer/filepath_helpers.rb', line 124 def data_filepath File.join output_directory, data_partial_filepath end |
#data_partial_filepath ⇒ Object
120 121 122 |
# File 'lib/abrizer/filepath_helpers.rb', line 120 def data_partial_filepath 'data.json' end |
#ffprobe_filepath ⇒ Object
44 45 46 |
# File 'lib/abrizer/filepath_helpers.rb', line 44 def ffprobe_filepath File.join output_directory, 'ffprobe.json' end |
#filename_directory ⇒ Object
34 35 36 |
# File 'lib/abrizer/filepath_helpers.rb', line 34 def filename_directory File.dirname @filename end |
#first_image_filepath ⇒ Object
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_filepath ⇒ Object
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_filepath ⇒ Object
76 77 78 |
# File 'lib/abrizer/filepath_helpers.rb', line 76 def hlsts_aac_partial_filepath 'hls/audio/aac/eng/media.aac' end |
#hlsts_filepath ⇒ Object
72 73 74 |
# File 'lib/abrizer/filepath_helpers.rb', line 72 def hlsts_filepath File.join output_directory, hlsts_partial_filepath end |
#hlsts_partial_filepath ⇒ Object
68 69 70 |
# File 'lib/abrizer/filepath_helpers.rb', line 68 def hlsts_partial_filepath 'hls/master.m3u8' end |
#mp3_filepath ⇒ Object
104 105 106 |
# File 'lib/abrizer/filepath_helpers.rb', line 104 def mp3_filepath File.join output_directory, mp3_partial_filepath end |
#mp3_partial_filepath ⇒ Object
100 101 102 |
# File 'lib/abrizer/filepath_helpers.rb', line 100 def mp3_partial_filepath 'progressive.mp3' end |
#mp4_filepath ⇒ Object
88 89 90 |
# File 'lib/abrizer/filepath_helpers.rb', line 88 def mp4_filepath File.join output_directory, mp4_partial_filepath end |
#mp4_partial_filepath ⇒ Object
84 85 86 |
# File 'lib/abrizer/filepath_helpers.rb', line 84 def mp4_partial_filepath 'progressive.mp4' end |
#mpd_filepath ⇒ Object
64 65 66 |
# File 'lib/abrizer/filepath_helpers.rb', line 64 def mpd_filepath File.join output_directory, mpd_partial_filepath end |
#mpd_partial_filepath ⇒ Object
60 61 62 |
# File 'lib/abrizer/filepath_helpers.rb', line 60 def mpd_partial_filepath 'fmp4/stream.mpd' end |
#output_directory ⇒ Object
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_basename ⇒ Object
30 31 32 |
# File 'lib/abrizer/filepath_helpers.rb', line 30 def output_directory_basename File.basename output_directory end |
#poster_filepath ⇒ Object
56 57 58 |
# File 'lib/abrizer/filepath_helpers.rb', line 56 def poster_filepath File.join output_directory, poster_partial_filepath end |
#poster_image_filepath ⇒ Object
140 141 142 |
# File 'lib/abrizer/filepath_helpers.rb', line 140 def poster_image_filepath File.join output_directory, 'poster.jpg' end |
#poster_partial_filepath ⇒ Object
52 53 54 |
# File 'lib/abrizer/filepath_helpers.rb', line 52 def poster_partial_filepath 'poster.jpg' end |
#sprites_filepath ⇒ Object
132 133 134 |
# File 'lib/abrizer/filepath_helpers.rb', line 132 def sprites_filepath File.join output_directory, sprites_partial_filepath end |
#sprites_partial_filepath ⇒ Object
128 129 130 |
# File 'lib/abrizer/filepath_helpers.rb', line 128 def sprites_partial_filepath 'sprites/sprites.vtt' end |
#vp9_filepath ⇒ Object
96 97 98 |
# File 'lib/abrizer/filepath_helpers.rb', line 96 def vp9_filepath File.join output_directory, vp9_partial_filepath end |
#vp9_partial_filepath ⇒ Object
92 93 94 |
# File 'lib/abrizer/filepath_helpers.rb', line 92 def vp9_partial_filepath 'progressive-vp9.webm' end |
#webvtt_input_filepath ⇒ Object
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 |