Skip to content

Instantly share code, notes, and snippets.

@dineshprasanna
dineshprasanna / composition.m
Created October 5, 2012 06:03 — forked from stuffmc/composition.m
AVComposition & AVVideoComposition
// For whatever reason (I guess because my code is wrong) the "composition" returns twice the same asset (one transformed, one not),
// although it should display 2 different videos... If anybody has a clue :(
NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], AVURLAssetPreferPreciseDurationAndTimingKey, nil];
AVMutableComposition *composition = [AVMutableComposition composition];
CMTimeRange timeRange = CMTimeRangeMake(kCMTimeZero, CMTimeMakeWithSeconds(4, 1));
AVMutableVideoComposition *videoComposition = [AVMutableVideoComposition videoComposition];
// Track B