GifReversingBot
GifReversingBot copied to clipboard
Long (30000+) frame gifs create too many parameters for gifski
The solution is to write a Cython library that interfaces directly to the gifski library. Cython is specifically needed because we need to run a second nogil thread for gifski's IO while we feed it frames in the main thread. This could also let us skip the FFmpeg reverse filter/file rename step
If you don't want to do a whole Cython wrapper, you could probably get away with using ctypes. It isn't 100% clear from the docs, but it does release the GIL when calling CDLL functions. So starting a thread that calls any gifski function will not block all the other threads.
It is also worth noting that according to the docs and the releases, you don't have to have a multithreaded setup anymore.