moviepy.audio.fx.all.multiply_volume¶
-
moviepy.audio.fx.all.
multiply_volume
(clip, factor, start_time=None, end_time=None)[source]¶ Returns a clip with audio volume multiplied by the value factor. Can be applied to both audio and video clips.
- Parameters:
- factorfloat
Volume multiplication factor.
- start_timefloat, optional
Time from the beginning of the clip until the volume transformation begins to take effect, in seconds. By default at the beginning.
- end_timefloat, optional
Time from the beginning of the clip until the volume transformation ends to take effect, in seconds. By default at the end.
Examples
>>> from moviepy import AudioFileClip >>> >>> music = AudioFileClip('music.ogg') >>> doubled_audio_clip = clip.multiply_volume(2) # doubles audio volume >>> half_audio_clip = clip.multiply_volume(0.5) # half audio >>> >>> # silenced clip during one second at third >>> silenced_clip = clip.multiply_volume(0, start_time=2, end_time=3)