Search code examples
iphoneavfoundationavcapturesessionavassetwriter

When recording video, how to set transformation (portrait, landscape, etc.) for video?


Should I use AVCaptureConnection's videoOrientation property, or set the transform property of the videoWriterInput, or something else?


Solution

  • Seems like AVCaptureConnection's videoOrientation property sets the orientation as it's recording, while the transform property of the videoWriterInput will set a flag for the playback transform.