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

Wrong number of frames in .gif file #181

Closed
avdeevvadim opened this issue Jul 3, 2015 · 2 comments
Closed

Wrong number of frames in .gif file #181

avdeevvadim opened this issue Jul 3, 2015 · 2 comments

Comments

@avdeevvadim
Copy link

Thank you for MoviePy, excellent project :)

I have a problem with correct number of frames in .gif file.
I have a list of images and want to construct an animated .gif file from these pictures. I use ImageSequenceClip and sometimes receive a file with the wrong number of frames.

MWE:

import numpy as np
import moviepy.editor as mpy

frames = 18
fps = 10
height = 10
width = 10
channels = 3

gif = np.zeros((frames, height, width, channels), np.uint8)

gif = list(gif)

animation = mpy.ImageSequenceClip(gif, fps = fps)
animation.write_gif('out.gif')

I expected to get out.gif with 18 frames, but after building file with imageio I received out.gif with 19 frames.
What is the problem here?

I use imageio 1.3, moviepy 0.2.2.11 and Python 3.4.3.

@neuroglobin
Copy link

Hello,
I'v met the same problem and believe this problem is not caused by moviepy itself.
Even I specified fps or duration directly in the freeimagemulti.py of imageio 1.3 (which moviepy calls), the same wrong-number-frame problem happened. I am not sure whether this problem is solved in newer version of imageio.

@keikoro
Copy link
Collaborator

keikoro commented Feb 17, 2017

I'm closing this issue because by the sounds of it, the problem reported here was not caused by MoviePy.

If it is/was documented in the imageio repo, please feel free to link any relevant info for future reference/in case others run into similar issues.

@keikoro keikoro closed this as completed Feb 17, 2017
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

No branches or pull requests

3 participants