Rotation of video to portriat for video composition #sample code
Becuse I wasn't able to find this documented anywhere, I thought I would post it for others education.
 
 
    videoLayer.frame = CGRectMake(5, -5, 320, 480); //0, 0, 320, 480 fullscreen
    AVMutableVideoComposition *videoComp = [AVMutableVideoComposition videoComposition];
    videoComp.renderSize = CGSizeMake(320, 480); //320, 480
    videoComp.frameDuration = CMTimeMake(1,30);
    CALayer *parentLayer = [CALayer layer];
    CALayer *videoLayer = [CALayer layer];
    parentLayer.frame = CGRectMake(5, -5, 320, 480); //0, 0, 320, 480 puts image on screen
    videoLayer.frame = CGRectMake(5, -5, 320, 480); //0, 0, 320, 480 fullscreen
 
    AVMutableVideoCompositionLayerInstruction* rotatedVideo = [AVMutableVideoCompositionLayerInstruction videoCompositionLayerInstructionWithAssetTrack:[[asset tracksWithMediaType:AVMediaTypeVideo] objectAtIndex:0]];
    CGAffineTransform translateToCenter = CGAffineTransformMakeTranslation(0, -520);   
    CGAffineTransform rotateBy90Degrees = CGAffineTransformMakeRotation( M_PI_2);
    CGAffineTransform moveRight = CGAffineTransformMakeTranslation(0, 200);
    CGAffineTransform shrinkWidth = CGAffineTransformMakeScale(.99, 1); // needed because Apple does a "stretch" by default
    CGAffineTransform finalTransform = CGAffineTransformConcat( shrinkWidth, CGAffineTransformConcat(translateToCenter, CGAffineTransformConcat(moveRight, rotateBy90Degrees)));
 
    [rotatedVideo setTransform:finalTransform atTime:kCMTimeZero];
 
 
 
-Rob Eickmann
Rotation of video to portriat for video composition #sample code
===

Becuse I wasn't able to find this documented anywhere, I thought I would post it for others education.
 
 
    videoLayer.frame = CGRectMake(5, -5, 320, 480); //0, 0, 320, 480 fullscreen
    AVMutableVideoComposition *videoComp = [AVMutableVideoComposition videoComposition];
    videoComp.renderSize = CGSizeMake(320, 480); //320, 480
    videoComp.frameDuration = CMTimeMake(1,30);
    CALayer *parentLayer = [CALayer layer];
    CALayer *videoLayer = [CALayer layer];
    parentLayer.frame = CGRectMake(5, -5, 320, 480); //0, 0, 320, 480 puts image on screen
    videoLayer.frame = CGRectMake(5, -5, 320, 480); //0, 0, 320, 480 fullscreen
 
    AVMutableVideoCompositionLayerInstruction* rotatedVideo = [AVMutableVideoCompositionLayerInstruction videoCompositionLayerInstructionWithAssetTrack:[[asset tracksWithMediaType:AVMediaTypeVideo] objectAtIndex:0]];
    CGAffineTransform translateToCenter = CGAffineTransformMakeTranslation(0, -520);   
    CGAffineTransform rotateBy90Degrees = CGAffineTransformMakeRotation( M_PI_2);
    CGAffineTransform moveRight = CGAffineTransformMakeTranslation(0, 200);
    CGAffineTransform shrinkWidth = CGAffineTransformMakeScale(.99, 1); // needed because Apple does a "stretch" by default
    CGAffineTransform finalTransform = CGAffineTransformConcat( shrinkWidth, CGAffineTransformConcat(translateToCenter, CGAffineTransformConcat(moveRight, rotateBy90Degrees)));
 
    [rotatedVideo setTransform:finalTransform atTime:kCMTimeZero];
 
 
 
-Rob Eickmann