Skip to content

write_videofile() Progress Bar Shows Incorrect Frame Count for Images Over 58 #2401

@wym1233

Description

@wym1233

I'm using write_videofile() to combine multiple images into a video. When the number of images is less than or equal to 58, the progress bar shows the correct number of frames. However, when the number exceeds 58, the progress bar displays one less frame than the actual number. I'm not sure if this is a bug.

Code:

fps = 24
image_files = sorted([os.path.join(image_folder, img) for img in os.listdir(image_folder) if img.endswith(".jpg") or img.endswith(".png")])

image_files=image_files[0:59]
print(len(image_files))
clip = ImageSequenceClip(image_files, fps=fps)
clip.write_videofile(output_video_path, codec='libx264')

#Here the progress bar shows that the number of frames is 58

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssues that report (apparent) bugs.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions