Update code and requirements to support Moviepy v2 #652
+16
−16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Moviepy released version 2 on November 20, 2024, introducing major breaking changes. The current code installs Moviepy v2 due to the requirement
moviepy>=1.0.3
, but it fails to run because of incompatibilities with the new version. This PR updates the code to match the v2 naming and importing conventions and ensures compatibility by updating the requirements tomoviepy>=2.0.0
.Changes Included:
Updated Requirements:
moviepy>=1.0.3
tomoviepy>=2.0.0
to ensure users with older versions upgrade to v2.Code Migration to Moviepy v2:
The following changes were made based on the official Moviepy v2 migration guide:
Replaced
moviepy.editor
imports with the new simplified syntax:Updated
.set_
methods to.with_
as per the new API:Updated
clip.resize()
toclip.resized()
to match the new signature:Testing:
Additional Notes:
If you’re using an older version of Moviepy (v1), you’ll need to upgrade to v2 to use this updated code. The changes are minimal but necessary for compatibility.