leafo / gifine

Quickly record and edit gifs and videos of your desktop

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use ffmped for GIF encoding

dundalek opened this issue · comments

Hi, I have a suggestion for GIF encoding. Currently gifine uses imagemagick's convert to produce GIFs. Convert seems to try to load all raw images into memory. That often makes my system run out of memory and freeze (with 16GB of RAM).

Instead there are options for ffmpeg to produce GIFs with a reasonable quality, speed and memory usage. Here is an example how ffmpeg can be used: https://github.com/lukechilds/gifgen/blob/master/gifgen#L71

Would it be possible to add it as an encoding option?

commented

I don't see why we couldn't add something.

what kind of gif are you creating that is causing your computer to run out of memory?

Usually some screencasts, around 1000px wide in 10 FPS, in the order of seconds or tens of seconds long.

What I do now is to export the recording as MP4 and then use the ffmpeg script to encode the GIF with no issues. But it would be nice to have that option as a single click.