nsrare / nsgif Goto Github PK
View Code? Open in Web Editor NEW🔮 iOS Library for converting videos to animated GIFs.
License: MIT License
🔮 iOS Library for converting videos to animated GIFs.
License: MIT License
Hi guys,
Great library! Thanks for building this.
I would like to add additional compression to the gifs. It's my understanding that this can be done by reducing the number of colors or increasing redundant patterns along scan lines.
Gifscicle is a command line utility that can compress gifs. Cloudinary is a cloud platform that can do it, too. So I know it's possible but it doesn't look to be easy in Objective-C and Core Graphics.
Does anyone have any advice? Any freelance developers looking for a quick gig?
Why ios10 can't loop forever,always loop one time.
Hi, I use this in my app https://github.com/onmyway133/GifCapture, it works well. But I don't know why this c4c79f2 changed delay time from 0.2 to 0.02? which makes the gif runs very quickly.
In my case, I changed delay time to 0.2 and fps to 5, and it looks great. What do you think @jacobrosenthal @sebyddd ?
This small Objective-C library converts videos to animated Gifs. Unfortunately, the library contains a memory leak which fails to release approximately the same amount of memory as the final size of the gif. Eventually this leads to a crash after multiple sequential conversions.
(This is a duplicate of the previous open issue. I have reposted to make a more concise explanation of the problem for the bugbounty)
Any advice on how this could be done? Thanks for your help
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?
I have an AVPlayer with a video and when I run the createGIFfromURL block, it I go home while it's working and reopen the app, the AVPlayer turns black. However, after a while, if I come back to the app , the AVPlayer returns to the screen.
Any ideas as to why this is happening and/or how to fix it?
How can I play the gif in reverse?
I can't search it in CocoaPods.
It costs time when copy images from asset to gif, maybe add a progress block will be better. We could see a progress when converting a long video.
Reason : Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Source type 1 not available'
As its not handled while using image picker in simulator
I'm using GPUImage to process a video and then save it as a Mov file, once the video is processed, it saves correctly to my video library.
UISaveVideoAtPathToSavedPhotosAlbum (pathToMovie, self, @selector(video:didFinishSavingWithError:contextInfo:), NULL);
in the didFinishSavingWithError function take the video URL and try to run it through NSGIF
(void)video: (NSString *) videoPath didFinishSavingWithError: (NSError *) error contextInfo: (void *) contextInfo;
NSURL *fileURL = [NSURL fileURLWithPath:videoPath];
[NSGIF createGIFfromURL:fileURL withFrameCount:30 delayTime:.010 loopCount:0 completion:^(NSURL *GifURL) {
NSLog(@"Finished generating GIF: %@", GifURL);
}];
if (error) {
NSLog(@"Error Saving Video To Library: %@", error);
// Do anything needed to handle the error or display it to the user
} else {
NSLog(@"Saved Video To Library:");
}
}
However I constantly get the following error
Error copying image: Error Domain=AVFoundationErrorDomain Code=-11832 "Cannot Open" UserInfo={NSUnderlyingError=0x12750ed50 {Error Domain=NSOSStatusErrorDomain Code=-12431 "(null)"}, NSLocalizedFailureReason=This media cannot be used., NSLocalizedDescription=Cannot Open}
2016-03-24 16:06:37.191 PhotoBooth[1123:444110] Error copying image and no previous frames to duplicate
Any idea what is causing this?
Once GIF is created and stored in iPhone Photos, Its not getting recognised as GIF for other apps.
e.g in Twitter app, Saved GIF in Photos not getting recognised as gif. Other GIF which are not created using NSGIF and stored in Photos are recognised.
it can’t run on XCode for verison 8.3.
Hi ,it really helps me a lot.But when I convert a lot times,it takes some memory.I can't free these memory.Can you help me?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.