Skip to content

Video editing with Python

rotation -> rotate, with clip.rotate now enabled.

Zulko4e8d49a8d90d
diff --git a/moviepy/editor.py b/moviepy/editor.py
index 815f1975..64285549 100644
--- a/moviepy/editor.py
+++ b/moviepy/editor.py
@@ -64,6 +64,7 @@ for method in [
"vfx.mask_and",
"vfx.mask_or",
"vfx.resize",
+ "vfx.rotate",
"vfx.speedx"
]:
diff --git a/moviepy/video/fx/rotation.py b/moviepy/video/fx/rotate.py
similarity index 90%
rename from moviepy/video/fx/rotation.py
rename to moviepy/video/fx/rotate.py
index e05ba64c..9299cd90 100644
--- a/moviepy/video/fx/rotation.py
+++ b/moviepy/video/fx/rotate.py
@@ -1,6 +1,6 @@
import numpy as np
-def rotation(clip, angle, apply_to_mask=True, unit='deg'):
+def rotate(clip, angle, apply_to_mask=True, unit='deg'):
if unit == 'rad':
angle = 360*angle/(2*3.14159)
@@ -14,7 +14,7 @@ def rotation(clip, angle, apply_to_mask=True, unit='deg'):
if angle in angle_transfo:
newclip = clip.fl_image( angle_transfo[angle])
else:
- raise ValueError('Angle not supported, only 90, -90, 180')
+ raise ValueError('Angle not supported, only 90, -90, 180 at the moment')
if apply_to_mask and (newclip.mask is not None):
newclip.mask = newclip.mask.fx( rotation, angle,