Class: Ffmprb::Process::Input::Loud
- Inherits:
-
Ffmprb::Process::Input
- Object
- Ffmprb::Process::Input
- Ffmprb::Process::Input::Loud
- Defined in:
- lib/ffmprb/process/input.rb
Instance Attribute Summary collapse
-
#from ⇒ Object
readonly
Returns the value of attribute from.
-
#to ⇒ Object
readonly
Returns the value of attribute to.
Instance Method Summary collapse
- #filters_for(lbl, process:, video: true, audio: true) ⇒ Object
-
#initialize(unfiltered, volume:) ⇒ Loud
constructor
A new instance of Loud.
Methods inherited from Ffmprb::Process::Input
#audio, #channel?, #crop, #cut, #options, #video, #volume
Constructor Details
#initialize(unfiltered, volume:) ⇒ Loud
Returns a new instance of Loud.
85 86 87 88 89 90 |
# File 'lib/ffmprb/process/input.rb', line 85 def initialize(unfiltered, volume:) @io = unfiltered @volume = volume raise Error, "volume cannot be nil" if volume.nil? end |
Instance Attribute Details
#from ⇒ Object (readonly)
Returns the value of attribute from.
83 84 85 |
# File 'lib/ffmprb/process/input.rb', line 83 def from @from end |
#to ⇒ Object (readonly)
Returns the value of attribute to.
83 84 85 |
# File 'lib/ffmprb/process/input.rb', line 83 def to @to end |
Instance Method Details
#filters_for(lbl, process:, video: true, audio: true) ⇒ Object
92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/ffmprb/process/input.rb', line 92 def filters_for(lbl, process:, video: true, audio: true) # Modulating volume lbl_aux = "ld#{lbl}" @io.filters_for(lbl_aux, process: process, video: video, audio: audio) + [ *((video && channel?(:video))? Filter.copy("#{lbl_aux}:v", "#{lbl}:v"): nil), *((audio && channel?(:audio))? Filter.volume(@volume, "#{lbl_aux}:a", "#{lbl}:a"): nil) ] end |