peetonn
peetonn

Reputation: 3052

AVCaptureSession and AVAssetWriter different settings

In the case of writing to file from camera using AVAssetWriting and setting, for example AVVideoWidth to 1280 and AVVideoHeight to 720, but use video settings for AVCAptureSession as AVCaptureSessionPreset640x480 (or any other resolutions). Will the video in the end be encoded in AVAssetWriter's settings or rather AVCaptureSession's settings will be applied?

Upvotes: 2

Views: 815

Answers (1)

Thomas Zoechling
Thomas Zoechling

Reputation: 34253

When setting up an AVCaptureSession you define the format that AVFoundation delivers to a client(== your app).
So a capture session is the starting point of your data flow.
AVAssetWriter is the final destination of your video data, so ultimately the video will have the format you specified when creating the asset writer.
In between, AVAssetWriter will transcode all samples it receives from the format of your capture session to the format you specified for your AVAssetWriterInput (in the outputSettings dict)

Upvotes: 1

Related Questions