AVCapturePhoto always highest resolution with builtInDualWideCamera and constituent device photo delivery enabled

I have built a camera application which uses a AVCaptureSession with the AVCaptureDevice set to .builtInDualWideCamera and isVirtualDeviceConstituentPhotoDeliveryEnabled=true to enable delivery of "simultaneous" photos (AVCapturePhoto) for a single capture request.

I am using the hd1920x1080 preset, but both the wide and ultra-wide photos are being delivered in the highest possible resolution (4224x2376). I've tried to disable any setting that suggests that it should be using that 4k resolution rather than 1080p on the AVCapturePhotoOutput, AVCapturePhotoSettings and AVCaptureDevice, but nothing has worked.

Some debugging that I've done:

  1. When I turn off constituent photo delivery by commenting out the line of code below, I end up getting a single photo delivered with the 1080p resolution, as you'd expect.
// photoSettings.virtualDeviceConstituentPhotoDeliveryEnabledDevices = captureDevice.constituentDevices
  1. I tried the constituent photo delivery with the .builtInDualCamera and got only 4k results (same as described above)

  2. I tried using a AVCaptureMultiCamSession with .builtInDualWideCamera and also only got 4k imagery

  3. I inspected the resolved settings on photo.resolvedSettings.photoDimensions, and the dimensions suggest the imagery should be 1080p, but then when I inspect the UIImage, it is always 4k.

guard let imageData = photo.fileDataRepresentation() else { return }
guard let capturedImage = UIImage(data: imageData ) else { return }

print("photo.resolvedSettings.photoDimensions", photo.resolvedSettings.photoDimensions) // 1920x1080
print("capturedImage.size", capturedImage.size) // 4224x2376

--

Any help here would be greatly appreciated, because I've run out of things to try and documentation to follow 🙏

Replies

Hello @nanders,

Please file a bug report for this issue using Feedback Assistant, and then please post the FB number back on this thread.

Thanks!

Add a Comment