leafo / gifine

Quickly record and edit gifs and videos of your desktop
285 stars 14 forks source link

Tried a few seconds(10-20) of gif, produced ~140GB of garbage in tmp #22

Closed ziaulrehman40 closed 1 year ago

ziaulrehman40 commented 4 years ago

I tried to produce a gif of like 10-20 seconds, it got stuck on optimizing gif. And i left my pc running, when i came back after ~1 hour, it was still stuck there. SO i cancelled it and killed the process.

So far so good, than i started getting low disk warnings. When i analyzed i saw ~140GB of gifine folder in /tmp directory.

Something fishy happened, and as of its impact, this needs to be fixed. I am sorry, i had to delete the folder without analyzing(because my machine was stucking) so can't say what was in it. But i felt that i must at-least report it.

PS: #18 #20 and #14 are related.

leafo commented 1 year ago

It sounds like you left it recording for a long time by accident.

The way this program works is by saving frames individually to files in a randomly generated directory in /tmp/. You then filter the frames at the end of the recording phase and encode it into a video or gif file. This tool is not designed for for long recording sessions as saving individual frames can be very disk usage intensive. (But 10-20 seconds should generally be fine)

gifine also does not clean up the tmp files, that's your job (either on system restart, or when you're done). It's done this way so you can recover a session to re-encode at a later time using the tool to load a directory of frames.

Hope that helps