Skip to content

n1mda/gif2mp4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

gif2mp4

(Objective-C) Convert .GIF to .MP4

MP4 videos must be of a height and width that is a multiple of 16, therefore what you enter as size may not be what comes out in the other end

Usage:

#import "GIFConverter.h"

NSData *gif = [NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://i.imgur.com/xqG0QP3.gif"]];
NSString *outputPath = [NSTemporaryDirectory() stringByAppendingString:@"output.mp4"];

GIFConverter *gifConverter = [[GIFConverter alloc] init];
[gifConverter convertGIFToMP4:gif speed:1.0 size:CGSizeMake(200, 200) repeat:0 output:outputPath completion:^(NSError *error){
	if(!error)
		NSLog(@"Converted video!");
}];

About

(Objective-C) Convert .GIF to .MP4

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages