Sha256: 964ec2c771c0ae1081383db3b7d7954c53253e032482cd22d8323b172e2e7042
Contents?: true
Size: 808 Bytes
Versions: 3
Compression:
Stored size: 808 Bytes
Contents
module Ffmprb class Process class Input def mute Loud.new self, volume: 0 end def volume(vol) Loud.new self, volume: vol end class Loud < ChainBase def initialize(unfiltered, volume:) super unfiltered @volume = volume fail Error, "volume cannot be nil" if volume.nil? end def filters_for(lbl, video:, audio:) # Modulating volume lbl_aux = "ld#{lbl}" super(lbl_aux, 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 end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ffmprb-0.12.3 | lib/ffmprb/process/input/loud.rb |
ffmprb-0.12.2 | lib/ffmprb/process/input/loud.rb |
ffmprb-0.12.1 | lib/ffmprb/process/input/loud.rb |