-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fluent API for effects (monkeypatch as methods) (#1105)
- Loading branch information
Showing
12 changed files
with
116 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
""" | ||
This module contains transformation functions (clip->clip) | ||
One file for one fx. The file's name is the fx's name | ||
""" | ||
# import every video fx function | ||
|
||
from .audio_fadein import audio_fadein | ||
from .audio_fadeout import audio_fadeout | ||
from .audio_left_right import audio_left_right | ||
from .audio_loop import audio_loop | ||
from .audio_normalize import audio_normalize | ||
from .volumex import volumex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
""" | ||
Loads all the fx! | ||
Usage: | ||
import moviepy.audio.fx.all as afx | ||
audio_clip = afx.volume_x(some_clip, .5) | ||
""" | ||
|
||
import pkgutil | ||
moviepy.audio.fx.all is deprecated. | ||
import moviepy.audio.fx as fx | ||
Use the fx method directly from the clip instance (e.g. ``clip.audio_loop(...)``) | ||
or import the function from moviepy.audio.fx instead. | ||
""" | ||
import warnings | ||
|
||
__all__ = [name for _, name, _ in pkgutil.iter_modules(fx.__path__) if name != "all"] | ||
from .. import * | ||
|
||
for name in __all__: | ||
exec("from ..%s import %s" % (name, name)) | ||
warnings.warn(f"\nMoviePy: {__doc__}", UserWarning) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,32 @@ | ||
""" | ||
This module contains transformation functions (clip->clip) | ||
One file for one fx. The file's name is the fx's name | ||
""" | ||
# import every video fx function | ||
|
||
from .accel_decel import accel_decel | ||
from .blackwhite import blackwhite | ||
from .blink import blink | ||
from .colorx import colorx | ||
from .crop import crop | ||
from .even_size import even_size | ||
from .fadein import fadein | ||
from .fadeout import fadeout | ||
from .freeze import freeze | ||
from .freeze_region import freeze_region | ||
from .gamma_corr import gamma_corr | ||
from .headblur import headblur | ||
from .invert_colors import invert_colors | ||
from .loop import loop | ||
from .lum_contrast import lum_contrast | ||
from .make_loopable import make_loopable | ||
from .margin import margin | ||
from .mask_and import mask_and | ||
from .mask_color import mask_color | ||
from .mask_or import mask_or | ||
from .mirror_x import mirror_x | ||
from .mirror_y import mirror_y | ||
from .painting import painting | ||
from .resize import resize | ||
from .rotate import rotate | ||
from .scroll import scroll | ||
from .speedx import speedx | ||
from .supersample import supersample | ||
from .time_mirror import time_mirror | ||
from .time_symmetrize import time_symmetrize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,11 @@ | ||
""" | ||
Loads all the fx ! | ||
Usage: | ||
import moviepy.video.fx.all as vfx | ||
clip = vfx.resize(some_clip, width=400) | ||
clip = vfx.mirror_x(some_clip) | ||
""" | ||
|
||
import pkgutil | ||
moviepy.video.fx.all is deprecated. | ||
import moviepy.video.fx as fx | ||
Use the fx method directly from the clip instance (e.g. ``clip.resize(...)``) | ||
or import the function from moviepy.video.fx instead. | ||
""" | ||
import warnings | ||
|
||
__all__ = [name for _, name, _ in pkgutil.iter_modules(fx.__path__) if name != "all"] | ||
from .. import * | ||
|
||
for name in __all__: | ||
exec("from ..%s import %s" % (name, name)) | ||
warnings.warn(f"\nMoviePy: {__doc__}", UserWarning) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters