title: AVMutableVideoCompositionLayerInstruction Transform not working?
body: <p>I am trying play and merge video. My application is only Landscape mode.</p>
  
  <blockquote>
    <p><strong>Problem</strong> When i pick recorded type video from the album. Video is rotated in the landscape mode.</p>
  </blockquote>
  
  <p>I have tried all the answer on the stackoverflow but none of them working.</p>
  
  <p>Here is my code</p>
  
  <pre><code> AVMutableVideoCompositionLayerInstruction *passThroughLayer = [AVMutableVideoCompositionLayerInstruction videoCompositionLayerInstructionWithAssetTrack:videoTrack];
  CGAffineTransform rotationTransform = CGAffineTransformMakeRotation(degreesToRadians(90.0));
  CGAffineTransform rotateTranslate = CGAffineTransformTranslate(rotationTransform,320,0);
  [passThroughLayer setTransform:rotateTranslate atTime:kCMTimeZero];
  
  AVMutableVideoCompositionInstruction *inst = 
              [AVMutableVideoCompositionInstruction videoCompositionInstruction];
  inst.timeRange = CMTimeRangeMake(insertionTime, insertRange.duration);
  inst.layerInstructions = [NSArray arrayWithObject:passThroughLayer];
  [videoCompositionInstructions addObject:inst];
  videoComposition.instructions = [NSArray arrayWithArray:videoCompositionInstructions];
  </code></pre>