Module: Abrizer::FilepathHelpers
- Included in:
- Adaptation, AdaptationsFile, Canvas, Captions, Cleaner, Data, FfmpegProcessor, FfprobeFile, PackageDashBento, PackageDashShaka, PackageHlsBento, PackageHlsShaka, ProgressiveMp3, ProgressiveMp4, ProgressiveVp9, TemporaryPoster
- Defined in:
- lib/abrizer/filepath_helpers.rb
Instance Method Summary collapse
- #adaptations_filepath ⇒ 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
Instance Method Details
#adaptations_filepath ⇒ Object
41 42 43 |
# File 'lib/abrizer/filepath_helpers.rb', line 41 def adaptations_filepath File.join output_directory, 'adaptations.json' end |
#audio_filepath ⇒ Object
3 4 5 |
# File 'lib/abrizer/filepath_helpers.rb', line 3 def audio_filepath File.join output_directory, "#{basename}-audio.m4a" end |
#audio_filepath_fragmented ⇒ Object
7 8 9 |
# File 'lib/abrizer/filepath_helpers.rb', line 7 def audio_filepath_fragmented File.join output_directory, "#{basename}-audio-frag.m4a" end |
#basename ⇒ Object
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_filepath ⇒ Object
109 110 111 |
# File 'lib/abrizer/filepath_helpers.rb', line 109 def canvas_filepath File.join output_directory, canvas_partial_filepath end |
#canvas_partial_filepath ⇒ Object
105 106 107 |
# File 'lib/abrizer/filepath_helpers.rb', line 105 def canvas_partial_filepath 'canvas.json' end |
#captions_filepath ⇒ Object
101 102 103 |
# File 'lib/abrizer/filepath_helpers.rb', line 101 def File.join output_directory, 'vtt/captions.vtt' end |
#data_filepath ⇒ Object
117 118 119 |
# File 'lib/abrizer/filepath_helpers.rb', line 117 def data_filepath File.join output_directory, data_partial_filepath end |
#data_partial_filepath ⇒ Object
113 114 115 |
# File 'lib/abrizer/filepath_helpers.rb', line 113 def data_partial_filepath 'data.json' end |
#ffprobe_filepath ⇒ Object
37 38 39 |
# File 'lib/abrizer/filepath_helpers.rb', line 37 def ffprobe_filepath File.join output_directory, 'ffprobe.json' end |
#filename_directory ⇒ Object
27 28 29 |
# File 'lib/abrizer/filepath_helpers.rb', line 27 def filename_directory File.dirname @filename end |
#first_image_filepath ⇒ Object
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_filepath ⇒ Object
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_filepath ⇒ Object
69 70 71 |
# File 'lib/abrizer/filepath_helpers.rb', line 69 def hlsts_aac_partial_filepath 'hls/audio/aac/eng/media.aac' end |
#hlsts_filepath ⇒ Object
65 66 67 |
# File 'lib/abrizer/filepath_helpers.rb', line 65 def hlsts_filepath File.join output_directory, hlsts_partial_filepath end |
#hlsts_partial_filepath ⇒ Object
61 62 63 |
# File 'lib/abrizer/filepath_helpers.rb', line 61 def hlsts_partial_filepath 'hls/master.m3u8' end |
#mp3_filepath ⇒ Object
97 98 99 |
# File 'lib/abrizer/filepath_helpers.rb', line 97 def mp3_filepath File.join output_directory, mp3_partial_filepath end |
#mp3_partial_filepath ⇒ Object
93 94 95 |
# File 'lib/abrizer/filepath_helpers.rb', line 93 def mp3_partial_filepath 'progressive.mp3' end |
#mp4_filepath ⇒ Object
81 82 83 |
# File 'lib/abrizer/filepath_helpers.rb', line 81 def mp4_filepath File.join output_directory, mp4_partial_filepath end |
#mp4_partial_filepath ⇒ Object
77 78 79 |
# File 'lib/abrizer/filepath_helpers.rb', line 77 def mp4_partial_filepath 'progressive.mp4' end |
#mpd_filepath ⇒ Object
57 58 59 |
# File 'lib/abrizer/filepath_helpers.rb', line 57 def mpd_filepath File.join output_directory, mpd_partial_filepath end |
#mpd_partial_filepath ⇒ Object
53 54 55 |
# File 'lib/abrizer/filepath_helpers.rb', line 53 def mpd_partial_filepath 'fmp4/stream.mpd' end |
#output_directory ⇒ Object
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_basename ⇒ Object
23 24 25 |
# File 'lib/abrizer/filepath_helpers.rb', line 23 def output_directory_basename File.basename output_directory end |
#poster_filepath ⇒ Object
49 50 51 |
# File 'lib/abrizer/filepath_helpers.rb', line 49 def poster_filepath File.join output_directory, poster_partial_filepath end |
#poster_image_filepath ⇒ Object
133 134 135 |
# File 'lib/abrizer/filepath_helpers.rb', line 133 def poster_image_filepath File.join output_directory, 'poster.jpg' end |
#poster_partial_filepath ⇒ Object
45 46 47 |
# File 'lib/abrizer/filepath_helpers.rb', line 45 def poster_partial_filepath 'poster.jpg' end |
#sprites_filepath ⇒ Object
125 126 127 |
# File 'lib/abrizer/filepath_helpers.rb', line 125 def sprites_filepath File.join output_directory, sprites_partial_filepath end |
#sprites_partial_filepath ⇒ Object
121 122 123 |
# File 'lib/abrizer/filepath_helpers.rb', line 121 def sprites_partial_filepath 'sprites/sprites.vtt' end |
#vp9_filepath ⇒ Object
89 90 91 |
# File 'lib/abrizer/filepath_helpers.rb', line 89 def vp9_filepath File.join output_directory, vp9_partial_filepath end |
#vp9_partial_filepath ⇒ Object
85 86 87 |
# File 'lib/abrizer/filepath_helpers.rb', line 85 def vp9_partial_filepath 'progressive-vp9.webm' end |
#webvtt_input_filepath ⇒ Object
11 12 13 |
# File 'lib/abrizer/filepath_helpers.rb', line 11 def webvtt_input_filepath File.join filename_directory, "#{basename}.vtt" end |