Video editing with Python
still in the process of numpydocing everything
Zulkoeed058785468
diff --git a/docs/conf.py b/docs/conf.pyindex ff5cf805..8685a91c 100644--- a/docs/conf.py+++ b/docs/conf.py@@ -27,7 +27,6 @@ import sys, os# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo','sphinx.ext.viewcode', 'numpydoc', 'sphinx.ext.autosummary']-autosummary_generate = True# Add any paths that contain templates here, relative to this directory.templates_path = ['_templates']diff --git a/docs/ref/VideoClip.rst b/docs/ref/VideoClip.rstindex f50e6d20..061cea7d 100644--- a/docs/ref/VideoClip.rst+++ b/docs/ref/VideoClip.rst@@ -4,22 +4,22 @@VideoClip************+.. currentmodule:: moviepy+:class:`VideoClip`==========================.. autoclass:: moviepy.video.VideoClip.VideoClip- :members::show-inheritance::class:`VideoFileClip`------------------------.. autoclass:: moviepy.video.io.VideoFileClip.VideoFileClip- :members::show-inheritance::class:`ImageClip`-==========================+----------------------.. autoclass:: moviepy.video.VideoClip.ImageClip:members:@@ -41,7 +41,7 @@ VideoClip:show-inheritance::class:`CompositeVideoClip`-============================+-------------------------------.. autoclass:: moviepy.video.compositing.CompositeVideoClip.CompositeVideoClip:members:@@ -50,4 +50,4 @@ VideoClipUseful Methods---------------.. automodule:: moviepy.video.compositing.concatenate+.. automodule:: moviepy.video.compositing.concatenate.concatenatediff --git a/docs/ref/ref.rst b/docs/ref/ref.rstindex 03558749..e736e56d 100644--- a/docs/ref/ref.rst+++ b/docs/ref/ref.rst@@ -4,14 +4,14 @@ Reference ManualThe documentation may be a little messy for the moment, it will get better with time... toctree::- :maxdepth: 2+ :maxdepth: 3ClipVideoClip- videofx- videotoolsAudioClip+ videofxaudiofx+ videotoolsaudiotoolsffmpegdecoratorsdiff --git a/moviepy/video/VideoClip.py b/moviepy/video/VideoClip.pyindex 2ce42fc0..619dd029 100644--- a/moviepy/video/VideoClip.py+++ b/moviepy/video/VideoClip.py@@ -32,7 +32,7 @@ from ..conf import FFMPEG_BINARYclass VideoClip(Clip):- """Base class for video clips+ """Base class for video clips.See ``VideofileClip``, ``ImageClip`` etc. for more user-friendlyclasses.@@ -41,7 +41,7 @@ class VideoClip(Clip):Parameters------------ ismask :+ ismask`True` if the clip is going to be used as a mask.@@ -104,7 +104,7 @@ class VideoClip(Clip):def save_frame(self, filename, t=0, savemask=False):- """Save a clip's frame to an image file.+ """ Save a clip's frame to an image file.Saves the frame of clip corresponding to time ``t`` in'filename'. If ``savemask`` is ``True`` the mask is saved in the@@ -122,7 +122,7 @@ class VideoClip(Clip):@requires_durationdef to_directory(self, foldername, fps, transparent=True,overwrite=True, startFrame=0):- """Writes the frames of the clip into a folder.+ """ Write the frames of the clip into a folder.Writes the frames of the clip into a folder as png format,and returns the :class:DirectoryClip associated with thisdiff --git a/moviepy/video/io/preview.py b/moviepy/video/io/preview.pyindex b7df17d8..cde44017 100644--- a/moviepy/video/io/preview.py+++ b/moviepy/video/io/preview.py@@ -9,22 +9,27 @@ pg.init()pg.display.set_caption('MoviePy')def imdisplay(imarray, screen=None):- """ splashes the given image array on the given pygame screen """- a = pg.surfarray.make_surface(imarray.swapaxes(0, 1))- if screen == None:- screen = pg.display.set_mode(imarray.shape[:2][::-1])- screen.blit(a, (0, 0))- pg.display.flip()+ """Splashes the given image array on the given pygame screen """+ a = pg.surfarray.make_surface(imarray.swapaxes(0, 1))+ if screen == None:+ screen = pg.display.set_mode(imarray.shape[:2][::-1])+ screen.blit(a, (0, 0))+ pg.display.flip()def show(clip, t=0, with_mask=True):"""Splashes the frame of clip corresponding to time ``t``.- :param t: time in seconds of the frame to display.+ Parameters+ ------------- :param with_mask: ``False`` if the clip has a mask but you- want to see the clip without the mask.+ t+ Time in seconds of the frame to display.++ with_mask+ ``False`` if the clip has a mask but you want to see the clip+ without the mask."""@@ -46,14 +51,19 @@ def preview(clip, fps=15, audio=True, audio_fps=22050,than normal if the computations are complex. In this case, tryreducing the ``fps``.- :param fps: Number of frames per second to be displayed.+ Parameters+ ------------++ fps+ Number of frames per seconds in the displayed video.- :param audio: ``True`` (default) if you want the clip's audio- to be played in playback. The synchronization is not garanteed.+ audio+ ``True`` (default) if you want the clip's audio be played during+ the preview.- :param audiofps: The frames per second to use when generating the- audio sound. The lower, the cheaper the sound will be.-+ audiofps+ The frames per second to use when generating the audio sound.+"""import pygame as pg