Class: Bagel::Video::ClipSaver
- Inherits:
-
Object
- Object
- Bagel::Video::ClipSaver
- Defined in:
- lib/bagel/video/clip_saver.rb
Instance Attribute Summary collapse
-
#clip ⇒ Object
readonly
Returns the value of attribute clip.
Instance Method Summary collapse
-
#initialize(clip) ⇒ ClipSaver
constructor
A new instance of ClipSaver.
- #save ⇒ Object
Constructor Details
#initialize(clip) ⇒ ClipSaver
Returns a new instance of ClipSaver.
5 6 7 |
# File 'lib/bagel/video/clip_saver.rb', line 5 def initialize(clip) @clip = clip end |
Instance Attribute Details
#clip ⇒ Object (readonly)
Returns the value of attribute clip.
3 4 5 |
# File 'lib/bagel/video/clip_saver.rb', line 3 def clip @clip end |
Instance Method Details
#save ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/bagel/video/clip_saver.rb', line 9 def save FFMPEG.trim( source: Bagel.config.source_video, start: clip.start, duration: clip.duration, destination: clip.trim_path ) FFMPEG.filter( inputs: inputs, filters: filters, destination: clip.clip_path ) end |