Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PEP 8 compatible #582

Merged
merged 1 commit into from
Jun 6, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions moviepy/audio/fx/volumex.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
from moviepy.decorators import audio_video_fx


@audio_video_fx
def volumex(clip, factor):
""" Returns a clip with audio volume multiplied by the
value `factor`. Can be applied to both audio and video clips.

This effect is loaded as a clip method when you use moviepy.editor,
so you can just write ``clip.volumex(2)``

Examples
---------

>>> newclip = volumex(clip, 2.0) # doubles audio volume
>>> newclip = clip.fx( volumex, 0.5) # half audio, use with fx
>>> newclip = clip.volumex(2) # only if you used "moviepy.editor"
"""
"""
return clip.fl(lambda gf, t: factor * gf(t),
keep_duration = True)
keep_duration=True)