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:, output:, 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, #mute, #options, #video, #volume
Constructor Details
#initialize(unfiltered, volume:) ⇒ Loud
Returns a new instance of Loud.
106 107 108 109 110 111 |
# File 'lib/ffmprb/process/input.rb', line 106 def initialize(unfiltered, volume:) @io = unfiltered @volume = volume fail Error, "volume cannot be nil" if volume.nil? end |
Instance Attribute Details
#from ⇒ Object (readonly)
Returns the value of attribute from.
104 105 106 |
# File 'lib/ffmprb/process/input.rb', line 104 def from @from end |
#to ⇒ Object (readonly)
Returns the value of attribute to.
104 105 106 |
# File 'lib/ffmprb/process/input.rb', line 104 def to @to end |
Instance Method Details
#filters_for(lbl, process:, output:, video: true, audio: true) ⇒ Object
113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/ffmprb/process/input.rb', line 113 def filters_for(lbl, process:, output:, video: true, audio: true) # Modulating volume lbl_aux = "ld#{lbl}" @io.filters_for(lbl_aux, process: process, output: output, 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 |