module Abrizer::FilepathHelpers

Public Instance Methods

adaptations_filepath() click to toggle source
# File lib/abrizer/filepath_helpers.rb, line 48
def adaptations_filepath
  File.join output_directory, 'adaptations.json'
end
all_media_paths() click to toggle source
# 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() click to toggle source
# File lib/abrizer/filepath_helpers.rb, line 8
def audio_filepath
  File.join output_directory, "adaptation-audio.m4a"
end
audio_filepath_fragmented() click to toggle source
# File lib/abrizer/filepath_helpers.rb, line 12
def audio_filepath_fragmented
  File.join output_directory, "adaptation-audio-frag.m4a"
end
basename() click to toggle source

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

# File lib/abrizer/filepath_helpers.rb, line 39
def basename
  extname = File.extname @filename
  File.basename @filename, extname
end
canvas_filepath() click to toggle source
# File lib/abrizer/filepath_helpers.rb, line 116
def canvas_filepath
  File.join output_directory, canvas_partial_filepath
end
canvas_partial_filepath() click to toggle source
# File lib/abrizer/filepath_helpers.rb, line 112
def canvas_partial_filepath
  'canvas.json'
end
captions_filepath() click to toggle source
# File lib/abrizer/filepath_helpers.rb, line 108
def captions_filepath
  File.join output_directory, 'vtt/captions.vtt'
end
data_filepath() click to toggle source
# File lib/abrizer/filepath_helpers.rb, line 124
def data_filepath
  File.join output_directory, data_partial_filepath
end
data_partial_filepath() click to toggle source
# File lib/abrizer/filepath_helpers.rb, line 120
def data_partial_filepath
  'data.json'
end
ffprobe_filepath() click to toggle source
# File lib/abrizer/filepath_helpers.rb, line 44
def ffprobe_filepath
  File.join output_directory, 'ffprobe.json'
end
filename_directory() click to toggle source
# File lib/abrizer/filepath_helpers.rb, line 34
def filename_directory
  File.dirname @filename
end
first_image_filepath() click to toggle source
# 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() click to toggle source
# 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() click to toggle source
# File lib/abrizer/filepath_helpers.rb, line 76
def hlsts_aac_partial_filepath
  'hls/audio/aac/eng/media.aac'
end
hlsts_filepath() click to toggle source
# File lib/abrizer/filepath_helpers.rb, line 72
def hlsts_filepath
  File.join output_directory, hlsts_partial_filepath
end
hlsts_partial_filepath() click to toggle source
# File lib/abrizer/filepath_helpers.rb, line 68
def hlsts_partial_filepath
  'hls/master.m3u8'
end
mp3_filepath() click to toggle source
# File lib/abrizer/filepath_helpers.rb, line 104
def mp3_filepath
  File.join output_directory, mp3_partial_filepath
end
mp3_partial_filepath() click to toggle source
# File lib/abrizer/filepath_helpers.rb, line 100
def mp3_partial_filepath
  'progressive.mp3'
end
mp4_filepath() click to toggle source
# File lib/abrizer/filepath_helpers.rb, line 88
def mp4_filepath
  File.join output_directory, mp4_partial_filepath
end
mp4_partial_filepath() click to toggle source
# File lib/abrizer/filepath_helpers.rb, line 84
def mp4_partial_filepath
  'progressive.mp4'
end
mpd_filepath() click to toggle source
# File lib/abrizer/filepath_helpers.rb, line 64
def mpd_filepath
  File.join output_directory, mpd_partial_filepath
end
mpd_partial_filepath() click to toggle source
# File lib/abrizer/filepath_helpers.rb, line 60
def mpd_partial_filepath
  'fmp4/stream.mpd'
end
output_directory() click to toggle source
# 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() click to toggle source
# File lib/abrizer/filepath_helpers.rb, line 30
def output_directory_basename
  File.basename output_directory
end
poster_filepath() click to toggle source
# File lib/abrizer/filepath_helpers.rb, line 56
def poster_filepath
  File.join output_directory, poster_partial_filepath
end
poster_image_filepath() click to toggle source
# File lib/abrizer/filepath_helpers.rb, line 140
def poster_image_filepath
  File.join output_directory, 'poster.jpg'
end
poster_partial_filepath() click to toggle source
# File lib/abrizer/filepath_helpers.rb, line 52
def poster_partial_filepath
  'poster.jpg'
end
sprites_filepath() click to toggle source
# File lib/abrizer/filepath_helpers.rb, line 132
def sprites_filepath
  File.join output_directory, sprites_partial_filepath
end
sprites_partial_filepath() click to toggle source
# File lib/abrizer/filepath_helpers.rb, line 128
def sprites_partial_filepath
  'sprites/sprites.vtt'
end
vp9_filepath() click to toggle source
# File lib/abrizer/filepath_helpers.rb, line 96
def vp9_filepath
  File.join output_directory, vp9_partial_filepath
end
vp9_partial_filepath() click to toggle source
# File lib/abrizer/filepath_helpers.rb, line 92
def vp9_partial_filepath
  'progressive-vp9.webm'
end
webvtt_input_filepath() click to toggle source

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

# File lib/abrizer/filepath_helpers.rb, line 18
def webvtt_input_filepath
  File.join filename_directory, "#{basename}.vtt" if @filename
end