diff --git a/docs/_static/code/user_guide/compositing/CompositeVideoClip.py b/docs/_static/code/user_guide/compositing/CompositeVideoClip.py index 65937e689..1524c526b 100644 --- a/docs/_static/code/user_guide/compositing/CompositeVideoClip.py +++ b/docs/_static/code/user_guide/compositing/CompositeVideoClip.py @@ -4,9 +4,9 @@ from moviepy import VideoFileClip, CompositeVideoClip # We load all the clips we want to compose -clip1 = VideoFileClip("some_background.mp4") -clip2 = VideoFileClip("some_video.mp4").subclipped(0, 1) -clip3 = VideoFileClip("some_moving_text.mp4") +clip1 = VideoFileClip("example.mp4") +clip2 = VideoFileClip("example2.mp4").subclipped(0, 1) +clip3 = VideoFileClip("example.mp4") # We concatenate them and write theme stacked on top of each other, # with clip3 over clip2 over clip1 diff --git a/docs/_static/code/user_guide/compositing/concatenate.py b/docs/_static/code/user_guide/compositing/concatenate.py index 5025356ed..cb9331907 100644 --- a/docs/_static/code/user_guide/compositing/concatenate.py +++ b/docs/_static/code/user_guide/compositing/concatenate.py @@ -3,9 +3,9 @@ from moviepy import VideoFileClip, concatenate_videoclips # We load all the clips we want to concatenate -clip1 = VideoFileClip("first_scene.mp4") -clip2 = VideoFileClip("second_scene.mp4").subclipped(0, 1) -clip3 = VideoFileClip("third_scene.mp4") +clip1 = VideoFileClip("example.mp4") +clip2 = VideoFileClip("example2.mp4").subclipped(0, 1) +clip3 = VideoFileClip("example3.mp4") # We concatenate them and write the result final_clip = concatenate_videoclips([clip1, clip2, clip3]) diff --git a/moviepy/tools.py b/moviepy/tools.py index 6270cf4db..52917b40f 100644 --- a/moviepy/tools.py +++ b/moviepy/tools.py @@ -73,7 +73,7 @@ def convert_to_seconds(time): convert_to_seconds('1:33,5') # only minutes and secs 99.5 convert_to_seconds('33.5') # only secs - 33.5 + 33.5 """ factors = (1, 60, 3600) @@ -103,12 +103,13 @@ def deprecated_version_of(func, old_name): Examples -------- - >>> # The badly named method 'to_file' is replaced by 'write_file' - >>> class Clip: - >>> def write_file(self, some args): - >>> # blablabla - >>> - >>> Clip.to_file = deprecated_version_of(Clip.write_file, 'to_file') + .. code:: python + + # The badly named method 'to_file' is replaced by 'write_file' + class Clip: + def write_file(self, some args): + # blablabla + Clip.to_file = deprecated_version_of(Clip.write_file, 'to_file') """ # Detect new name of func new_name = func.__name__ diff --git a/moviepy/video/fx/MasksAnd.py b/moviepy/video/fx/MasksAnd.py index 014007165..c81a33d62 100644 --- a/moviepy/video/fx/MasksAnd.py +++ b/moviepy/video/fx/MasksAnd.py @@ -29,7 +29,7 @@ class MasksAnd(Effect): mask = ColorClip(color=(0, 255, 0), size=(1, 1)) # green masked_clip = clip.with_effects([vfx.MasksAnd(mask)]) # black masked_clip.get_frame(0) - [[[0 0 0]]] + [[[0 0 0]]] """ other_clip: Union[Clip, np.ndarray] diff --git a/moviepy/video/fx/MasksOr.py b/moviepy/video/fx/MasksOr.py index 164d6c4ff..7ec6d2eec 100644 --- a/moviepy/video/fx/MasksOr.py +++ b/moviepy/video/fx/MasksOr.py @@ -29,7 +29,7 @@ class MasksOr(Effect): mask = ColorClip(color=(0, 255, 0), size=(1, 1)) # green masked_clip = clip.with_effects([vfx.MasksOr(mask)]) # yellow masked_clip.get_frame(0) - [[[255 255 0]]] + [[[255 255 0]]] """ other_clip: Union[Clip, np.ndarray] diff --git a/moviepy/video/io/VideoFileClip.py b/moviepy/video/io/VideoFileClip.py index 6aa16e518..eef2f0b87 100644 --- a/moviepy/video/io/VideoFileClip.py +++ b/moviepy/video/io/VideoFileClip.py @@ -83,7 +83,6 @@ class VideoFileClip(VideoClip): If copies are made, and close() is called on one, it may cause methods on the other copies to fail. - """ @convert_path_to_string("filename") diff --git a/moviepy/video/tools/cuts.py b/moviepy/video/tools/cuts.py index 6073c3cd7..ba38a5f40 100644 --- a/moviepy/video/tools/cuts.py +++ b/moviepy/video/tools/cuts.py @@ -35,7 +35,7 @@ def find_video_period(clip, fps=None, start_time=0.3): clip = VideoFileClip("media/chaplin.mp4").subclipped(0, 1).loop(2) round(videotools.find_video_period(clip, fps=80), 6) - 1 + 1 """ def frame(t): diff --git a/moviepy/video/tools/drawing.py b/moviepy/video/tools/drawing.py index df9be92f3..9bbd2d245 100644 --- a/moviepy/video/tools/drawing.py +++ b/moviepy/video/tools/drawing.py @@ -105,7 +105,9 @@ def color_gradient( color_gradient((10, 1), (0, 0), p2=(10, 0)) # from white to black #[[1. 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1]] # from red to green - color_gradient((10, 1), (0, 0), p2=(10, 0), color_1=(255, 0, 0), color_2=(0, 255, 0)) + color_gradient( + (10, 1), (0, 0), p2=(10, 0), color_1=(255, 0, 0), color_2=(0, 255, 0) + ) # [[[ 0. 255. 0. ] # [ 25.5 229.5 0. ] # [ 51. 204. 0. ]