Class: FFmpegCore::Transcoder
- Inherits:
-
Object
- Object
- FFmpegCore::Transcoder
- Defined in:
- lib/ffmpeg_core/transcoder.rb
Overview
Execute FFmpeg transcoding operations
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 = {}) ⇒ Transcoder
constructor
A new instance of Transcoder.
- #run(&block) ⇒ Object
Constructor Details
#initialize(input_path, output_path, options = {}) ⇒ Transcoder
Returns a new instance of Transcoder.
11 12 13 14 15 |
# File 'lib/ffmpeg_core/transcoder.rb', line 11 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.
9 10 11 |
# File 'lib/ffmpeg_core/transcoder.rb', line 9 def input_path @input_path end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
9 10 11 |
# File 'lib/ffmpeg_core/transcoder.rb', line 9 def @options end |
#output_path ⇒ Object (readonly)
Returns the value of attribute output_path.
9 10 11 |
# File 'lib/ffmpeg_core/transcoder.rb', line 9 def output_path @output_path end |
Instance Method Details
#run(&block) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/ffmpeg_core/transcoder.rb', line 17 def run(&block) validate_input! ensure_output_directory! command = build_command execute_command(command, &block) end |