Class: Abrizer::FfprobeFile
- Inherits:
-
Object
- Object
- Abrizer::FfprobeFile
- Includes:
- FilepathHelpers
- Defined in:
- lib/abrizer/ffprobe_file.rb
Instance Method Summary collapse
-
#initialize(filename, output_directory) ⇒ FfprobeFile
constructor
A new instance of FfprobeFile.
- #run ⇒ Object
Methods included from FilepathHelpers
#adaptations_filepath, #all_media_paths, #audio_filepath, #audio_filepath_fragmented, #basename, #canvas_filepath, #canvas_partial_filepath, #captions_filepath, #data_filepath, #data_partial_filepath, #ffprobe_filepath, #filename_directory, #first_image_filepath, #hlsts_aac_filepath, #hlsts_aac_partial_filepath, #hlsts_filepath, #hlsts_partial_filepath, #mp3_filepath, #mp3_partial_filepath, #mp4_filepath, #mp4_partial_filepath, #mpd_filepath, #mpd_partial_filepath, #output_directory, #output_directory_basename, #poster_filepath, #poster_image_filepath, #poster_partial_filepath, #sprites_filepath, #sprites_partial_filepath, #vp9_filepath, #vp9_partial_filepath, #webvtt_input_filepath
Constructor Details
#initialize(filename, output_directory) ⇒ FfprobeFile
Returns a new instance of FfprobeFile.
6 7 8 9 10 |
# File 'lib/abrizer/ffprobe_file.rb', line 6 def initialize(filename, output_directory) @informer = FfprobeInformer.new(filepath: filename) @output_directory = output_directory FileUtils.mkdir_p @output_directory unless File.exist? @output_directory end |
Instance Method Details
#run ⇒ Object
12 13 14 15 16 |
# File 'lib/abrizer/ffprobe_file.rb', line 12 def run File.open(ffprobe_filepath, 'w') do |fh| fh.puts @informer.to_json end end |