NSRare / NSGIF

🔮 iOS Library for converting videos to animated GIFs.
MIT License
923 stars 190 forks source link

Support for large number of frames #17

Open zackhsuan opened 8 years ago

zackhsuan commented 8 years ago

Hi All

NSGIF is a great tool to convert videos. But I am having issues converting videos to gifs. Usually, a gif does not need to be too sensitive on FPS. But when I am creating a gif file with frames more a certain number, eg. 100, the app gets crashed very easily. I found the reason is caused by the CGImageDestinationFinalize. When finalizing the images, I can see that it brings all image frames into memory and crashed the app.

Anyone has ideas to deal with large number of frames in conversion?

sebyddd commented 7 years ago

Have you tried tweaking your frame count / delay based on your video duration / no. of frames?

zackhsuan commented 7 years ago

@sebyddd Yes, I have. The thing is about converting a large number of frames could get crashes. Even by tweaking delay, video frames could not result in reducing the number of frames sometimes. I suppose it is the limitation from CGImageDestinationFinalize method.

sebyddd commented 7 years ago

What iOS version are you experiencing this on. Please check #9.