write_gif() output file size is large
See original GitHub issueconverted a first 10 seconds of a clip(50 mb) with write_gif() gave me a 46 mb gif
clip = VideoFileClip("input.mp4").subclip('2:09:05', '2:09:17')
video = CompositeVideoClip([clip])
video.write_gif("output.gif", program='ffmpeg', fps=clip.fps)
i also test imageio but that is worse, gave me 76 mb
- Python Version: 3.6
- Moviepy Version: 0.2.3.2
- Platform Name: windows 10
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:10 (1 by maintainers)
Top Results From Across the Web
WriteGif.java - Project Nayuki
GIF image file writer * * * Converts an input image file to an output GIF file, ... LZW encoding is used, which...
Read more >Output files are too large - Movavi Support
Output files are too large · Please note, that file size depends on many factors like resolution, duration, bitrate, compression ratio, and codec ......
Read more >GIF Output - LibGD
gdImageGifPtr stores the image in a large array of bytes. Parameters. im, The image to write. outFile, The FILE pointer to write the...
Read more >https://www.digiater.nl/openvms/freeware/v20/xv310...
xvgifwr.c - handles writing of GIF files. based on flgife.c and * flgifc.c ... FatalError("Unable to malloc in WriteGIF()"); rmap = rtemp; gmap...
Read more >Programmatically generate video or animated GIF in Python?
GIF" writeGif(filename, images, duration=0.2) #54 frames written # #Process ... im is your original image frames = [frame.copy() for frame in ImageSequence.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Using
ffmpeginstead ofimageiocan significantly reduce the file size For a seven second gif I got the following results.ffmpeg: 19MBimageio: 39MBCode used
Closing this issue as it’s old and hasn’t seen any response from OP in several years, and people have responded to other commenters in the thread with potential solutions.