From 70ef9f770c4c0a6521031953ae6e88fe632a52b5 Mon Sep 17 00:00:00 2001 From: Implosiv3 Date: Mon, 20 Jan 2025 08:00:12 +0100 Subject: [PATCH] Fix issue #2330 audio write wrong fps Fixes a bug that is not setting the instance 'fps' value when it has the attribute, but doing it when it doesn't. --- moviepy/audio/AudioClip.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moviepy/audio/AudioClip.py b/moviepy/audio/AudioClip.py index 5aa10e912..3a04b40e1 100644 --- a/moviepy/audio/AudioClip.py +++ b/moviepy/audio/AudioClip.py @@ -240,9 +240,9 @@ def write_audiofile( """ if not fps: if hasattr(self, "fps"): - fps = 44100 - else: fps = self.fps + else: + fps = 44100 if codec is None: name, ext = os.path.splitext(os.path.basename(filename))