Skip to content

Instantly share code, notes, and snippets.

@NghiaTranUIT
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NghiaTranUIT/dd15838b1e478f4dc74e to your computer and use it in GitHub Desktop.
Save NghiaTranUIT/dd15838b1e478f4dc74e to your computer and use it in GitHub Desktop.
MergeAVAsset
- (void) mergeAVAssetByArrAsset:(NSArray *) arrAsset
{
AVMutableComposition * composition = [AVMutableComposition composition];
for (AVAsset *asset in arrAsset)
{
CMTimeRange timeRange = CMTimeRangeMake(kCMTimeZero, asset.duration);
[composition insertTimeRange:timeRange ofAsset:asset atTime:composition.duration error:nil];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment