AVComposition video size issue

When I use AVMutableComposition to combine two videos by one AVCompositionTrack , every thing is OK, the size of two video is 480 x 270 and 1080 x 720.But the size of composition is error when I cmobine the two videos by two AVCompositionTracks.The bigger video shows a little of left - top corner . How do I justtice the size and position of the two tracks? I want scale the smaller video to the same size with the bigger one, but I don`t know how. Please help me.Thanks a lot!

Replies

You'll need to use CGAffineTransforms to transform the size of one video to the bounds of another .. note that you will also need to accomodate transforms for landscape->portrait (and back again) if that is a requirement for your app.