Skip to content

Instantly share code, notes, and snippets.

View b9AobJ's full-sized avatar
🙊
crazy on the writting bugs

a'lin b9AobJ

🙊
crazy on the writting bugs
View GitHub Profile
@stuffmc
stuffmc / composition.m
Created January 6, 2012 21:59
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