Unable to set FPS in GIFs #2151
Labels
bug
Issues that report (apparent) bugs.
lib-imageio
Issues pertaining to dependency imageio.
video
Related to VideoClip and related classes, or handling of video in general.
Hey,
When using MoviePy to store frame sequences as GIFs, I noticed that setting the fps parameter seems to have no effect. After digging around in the code a little bit, I found the issue.
In
moviepy/video/io/gif_writers.py
, line 442:Here, the duration passed to imageio is in seconds, which is consistent with imageio's documentation. Unfortunately, though, the documentation is erroneous in this case, as the underlying Pillow expects milliseconds.
I believe the best course of action is to ignore the documentation of imageio and pass the value as milliseconds.
Currently, this issue affects PyTorch's
SummaryWriter
, which uses MoviePy to store videos as GIFs.Best,
Tim
The text was updated successfully, but these errors were encountered: