• Stars
    star
    233
  • Rank 172,230 (Top 4 %)
  • Language
    Objective-C
  • License
    Apache License 2.0
  • Created over 9 years ago
  • Updated almost 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simple library for rotating, cropping, embedding layers (watermark) and adding audio (music) to the videos.

LLVideoEditor: An easy to use library for editing videos.

LLVideoEditor is a library for rotating, cropping, adding layers (watermark) and as well as adding audio (music) to the videos.

You can use it in conjunction with my other library: LLSimpleCamera.

Example usage

// initialize the editor
LLVideoEditor *videoEditor = [[LLVideoEditor alloc] initWithVideoURL:videoURL];

// rotate
[videoEditor rotate:LLRotateDegree90];

// crop
[videoEditor crop:CGRectMake(10, 10, 300, 200)];

// add layer
[videoEditor addLayer:layer];

// add audio
[videoEditor addAudio:audioAsset startingAt:1 trackDuration:3];

// and finally export
[videoEditor exportToUrl:exportUrl completionBlock:^(AVAssetExportSession *session) {
    
    switch (session.status) {
        case AVAssetExportSessionStatusCompleted: {
            // show the cropped video
            VideoViewController *vc = [[VideoViewController alloc] initWithVideoUrl:exportUrl];
            [self.navigationController pushViewController:vc animated:NO];
            break;
        }
        case AVAssetExportSessionStatusFailed:
            NSLog(@"Failed:%@",session.error);
            break;
        case AVAssetExportSessionStatusCancelled:
            NSLog(@"Canceled:%@", session.error);
            break;
        default:
            break;
    }
}];

Don't forget to run "pod install" to use the included example.

Install

pod 'LLVideoEditor', '~> 1.0'

Contribution

This project is very at beginning. I'll try to improve it and add more features. Your contribution is also welcome. Simply send pull requests to the develop branch.

I have implemented a "Command Design Pattern". What you have to do basicly is to create a new Command class and implement whatever you want to do with the existing compositions of the video.

Contact

Ömer Faruk Gül

Personal Site

[email protected]