Skip to content

dominico-park/TRReverse

 
 

Repository files navigation

TRReverse

A set of utility classes for reversing AVAsset video and audio partially. These classes will reverse video, audio and videos with audio. Video reversal is based heavily on Chris Sung's CSVideoReverse class, This is forked from Interfacelab/ILABReverseVideoExporter

Installation

If you are using cocoapods:

pod 'TRReverse'

Otherwise, you can drag the files in the Source directory into your project.

I don't use carthage, so shrug.

Usage

Usage is pretty simple. All processing happens in on a separate thread and, thanks to Chris, is very memory performant.

#import <ILABReverseVideoExporter/ILABReverseVideoExporter.h>

ILABReverseVideoExportSession *exportSession = [ILABReverseVideoExportSession exportSessionWithURL:sourceAssetURL outputURL:outputAssetURL];
    
ILABProgressBlock progressBlock = ^(NSString *currentOperation, float progress) {
    // If progress == INFINITY then the class is performing
    // a process whose progress can't be tracked
    NSLog(@"Progress: %f", (progress == INFINITY) ? '0' : progress * 100.);
};
    
ILABCompleteBlock completeBlock = ^(BOOL complete, NSError *error) {
    NSLog(@"Done.");
};
    
[exportSession exportAsynchronously:progressBlock complete:completeBlock];

Demo

To get the video running, simply open up a terminal to the demo's directory and type:

pod install

About

Utility class for exporting partial reversed AVAssets. Forked from Interfacelab/ILABReverseVideoExporter

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Objective-C 98.9%
  • Ruby 1.1%