Class: FFmpegCore::AudioExtractor
- Inherits:
-
Object
- Object
- FFmpegCore::AudioExtractor
- Defined in:
- lib/ffmpeg_core/audio_extractor.rb
Overview
Extract audio track from video files
Instance Attribute Summary collapse
-
#input_path ⇒ Object
readonly
Returns the value of attribute input_path.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#output_path ⇒ Object
readonly
Returns the value of attribute output_path.
Instance Method Summary collapse
-
#initialize(input_path, output_path, options = {}) ⇒ AudioExtractor
constructor
A new instance of AudioExtractor.
- #run ⇒ Object
Constructor Details
#initialize(input_path, output_path, options = {}) ⇒ AudioExtractor
Returns a new instance of AudioExtractor.
10 11 12 13 14 |
# File 'lib/ffmpeg_core/audio_extractor.rb', line 10 def initialize(input_path, output_path, = {}) @input_path = input_path.to_s @output_path = output_path.to_s @options = end |
Instance Attribute Details
#input_path ⇒ Object (readonly)
Returns the value of attribute input_path.
8 9 10 |
# File 'lib/ffmpeg_core/audio_extractor.rb', line 8 def input_path @input_path end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
8 9 10 |
# File 'lib/ffmpeg_core/audio_extractor.rb', line 8 def @options end |
#output_path ⇒ Object (readonly)
Returns the value of attribute output_path.
8 9 10 |
# File 'lib/ffmpeg_core/audio_extractor.rb', line 8 def output_path @output_path end |
Instance Method Details
#run ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/ffmpeg_core/audio_extractor.rb', line 16 def run validate_input! ensure_output_directory! command = build_command execute_command(command) end |