Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a new method which returns an ImageSequenceClip instance of an … #2040

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BhadriNarayana
Copy link

Description:

This pull request introduces a new feature to the ImageSequenceClip class in the MoviePy library. The feature adds a from_images_and_times method that enables users to create video clips directly from a list of images and their corresponding durations. This enhancement simplifies video creation, offers greater flexibility, and increases productivity for MoviePy users.

Changes Made:

Added a new method, from_images_and_times, to the ImageSequenceClip class.
Implemented the logic to create a video clip from a list of images and durations.
Enhanced error handling and parameter validation.

Usage Example:

from moviepy.editor import ImageSequenceClip

# List of image file paths
image_paths = ["image1.jpg", "image2.jpg", "image3.jpg"]

# Durations for each image in seconds
durations = [2, 3, 4]

# Create a video from the images and durations
video = ImageSequenceClip.from_images_and_times(image_paths, durations)

# Write the video to a file
video.write_videofile("output.mp4", codec='libx264')

Benefits:

Simplifies video creation from sequences of images.
Offers precise control over frame durations.
Increases productivity by automating video creation tasks.

Testing Done:

Tested the new from_images_and_times method with various image sequences and durations to ensure its correctness and functionality.
Verified that the generated video clips match the expected output.

Closing Remarks:

I kindly request a review and consideration of this pull request. Your feedback and input are invaluable in ensuring the quality and usefulness of this feature. Merging this enhancement will benefit MoviePy users by simplifying their workflow and expanding the capabilities of the library.

Thank you for your time and attention.

Sincerely,

Y M Bhadri Narayana

https://github.com/BhadriNarayana

bhadrinarayana445@gmail.com

…image sequence formed from a list of images and their corresponding durations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant