Video editing with Python
🐛 修复Bug
KimigaiiWuyia351edd3399c
diff --git a/moviepy/Clip.py b/moviepy/Clip.pyindex b12fc65f..710c0a14 100644--- a/moviepy/Clip.py+++ b/moviepy/Clip.py@@ -206,10 +206,10 @@ class Clip:return new_clip+ @outplace@apply_to_mask@apply_to_audio@convert_parameter_to_seconds(["t"])- @outplacedef with_start(self, t, change_end=True):"""Returns a copy of the clip, with the ``start`` attribute setto ``t``, which can be expressed in seconds (15.35), in (min, sec),@@ -247,10 +247,10 @@ class Clip:elif self.end is not None:self.duration = self.end - self.start+ @outplace@apply_to_mask@apply_to_audio@convert_parameter_to_seconds(["t"])- @outplacedef with_end(self, t):"""Returns a copy of the clip, with the ``end`` attribute set to ``t``,which can be expressed in seconds (15.35), in (min, sec), in@@ -281,10 +281,10 @@ class Clip:else:self.duration = self.end - self.start+ @outplace@apply_to_mask@apply_to_audio@convert_parameter_to_seconds(["duration"])- @outplacedef with_duration(self, duration, change_end=True):"""Returns a copy of the clip, with the ``duration`` attribute set to``t``, which can be expressed in seconds (15.35), in (min, sec), indiff --git a/moviepy/audio/AudioClip.py b/moviepy/audio/AudioClip.pyindex 3a04b40e..293445f3 100644--- a/moviepy/audio/AudioClip.py+++ b/moviepy/audio/AudioClip.py@@ -6,6 +6,7 @@import numbersimport os+from typing import Listimport numpy as npimport proglog@@ -420,7 +421,7 @@ class CompositeAudioClip(AudioClip):return zero + sum(sounds)-def concatenate_audioclips(clips):+def concatenate_audioclips(clips: List[AudioClip]):"""Concatenates one AudioClip after another, in the order that are passedto ``clips`` parameter.diff --git a/moviepy/video/VideoClip.py b/moviepy/video/VideoClip.pyindex 0b22a6d5..6cdc8ee4 100644--- a/moviepy/video/VideoClip.py+++ b/moviepy/video/VideoClip.py@@ -965,8 +965,8 @@ class VideoClip(Clip):"""Remove the clip's mask."""self.mask = None- @add_mask_if_none@outplace+ @add_mask_if_nonedef with_opacity(self, opacity):"""Set the opacity/transparency level of the clip.@@ -975,8 +975,8 @@ class VideoClip(Clip):"""self.mask = self.mask.image_transform(lambda pic: opacity * pic)- @apply_to_mask@outplace+ @apply_to_maskdef with_position(self, pos, relative=False):"""Set the clip's position in compositions.@@ -1009,8 +1009,8 @@ class VideoClip(Clip):else:self.pos = lambda t: pos- @apply_to_mask@outplace+ @apply_to_maskdef with_layer_index(self, index):"""Set the clip's layer in compositions. Clips with a greater ``layer``attribute will be displayed on top of others.