Developer Reference - dariuswak/Aqua-Cam GitHub Wiki

TODO

  • Investigate deferred photo delivery - currently disabled, problems with missing location in the eventual photo (proxy is fine).
    • "If you normally make changes to a photo's pixel buffer like applying a filter, or if you make changes to metadata or other properties of AVCapturePhoto using AVCapturePhoto File Data Representation Customizer, these won't take effect for the finalized photo in the library once processing is complete. You'll need to do this later as adjustments to the photo using the PhotoKit APIs."
      https://developer.apple.com/videos/play/wwdc2023/10105/?time=845
  • Settings: add option to switch off capturing Live Photos

Working with branches

The recommended git workflow uses dev-<username> and release-<username> branches beside main, mainly due to DEVELOPMENT_TEAM ID must be different for every developer. If this workflow proves too difficult, we can improve it, e.g. by setting DEVELOPMENT_TEAM as an environment variable, etc.

See also: Binary Distributions#Distribution Guide

release-<username>

This branch purpose is to perform releases only.

  1. This branch should have set DEVELOPMENT_TEAM ID just after it has been created (one-off change).
  2. To release, main branch should be merged into this branch, which will automatically trigger release process in Xcode Cloud.
    1. Check out release-<username>, pull and create a PR branch: release-<version>-<username> from it.
    2. Merge origin/main
    3. Re-apply team ID changes: git cherry-pick 6ab6cb2 Example commit
    4. Test the project content - should show team ID, not "":
      grep DEVELOPMENT_TEAM "Aqua Cam.xcodeproj/project.pbxproj"
    5. Push, create PR, merge into release-<username>.
  3. Beside that, this branch should never get any changes.

See also: Binary Distributions#Distribution Guide

dev-<username>

This branch purpose is to perform all development.

  1. This branch should have merged release-<username> into it, with DEVELOPMENT_TEAM ID set, just after it has been created (one-off change). That way all development and testing can be conveniently done from this branch (i.e. short-lived PR branches created from and merged into it).
    1. After that, this branch should be merged into main ignoring DEVELOPMENT_TEAM ID changes (i.e. git checkout main; git merge --strategy ours dev-<username> (one-off change). This way dev-<username> can be frequently merged into main without risk of accidentally setting DEVELOPMENT_TEAM ID in main.
  2. This branch should be frequently merged into main to share changes with others, and to support releases.
  3. Merging main into dev-<username>. As long as there's mainly single contributor, there should rarely be need to merge main into dev-<username>. Therefore this instruction is currently complicated. To be improved as needed.
    1. Merge main into dev-<username>
      1. Check out dev-<username>, pull and create a PR branch: update-with-main from it.
      2. Merge origin/main using ours strategy on the last "Merge branch 'dev-<username>' ignoring changes" commit, e.g.:
        git merge --strategy ours 18b008c3, append "ignoring changes" to the commit message.
      3. Merge origin/main (the remaining)
      4. Test the project content - should show team ID, not "":
        grep DEVELOPMENT_TEAM "Aqua Cam.xcodeproj/project.pbxproj"
      5. Push, create PR, merge into dev-<username>.
    2. Merge dev-<username> back into main, preparing it for further development merges
      1. Check out main, pull and create a PR branch: update-with-dev-<username> from it.
      2. Merge origin/dev-<username> using ours strategy on the last "Merge commit '...' into update-with-main ignoring changes" commit, e.g.:
        git merge --strategy ours d1a5c33, append "ignoring changes" to the commit message.
      3. Merge origin/dev-<username> (the remaining)
      4. Test the project content - should show empty team ID "":
        grep DEVELOPMENT_TEAM "Aqua Cam.xcodeproj/project.pbxproj"
      5. Push, create PR - SHOULD SHOW NO CHANGES - merge into main.

main

This branch purpose is to accumulate changes from all development teams, and to support releases.

  1. All changes from all dev-<username> branches should be frequently merged into main.
    1. Except DEVELOPMENT_TEAM ID in the project file - which MUST NEVER BE MERGED INTO main!
  2. This branch is to be merged into release-<username> to perform release.
    1. Just before that, it should have incremented release version. Example PR.

Notes

iPhone 13 Pro

  • 4K format - NO DEPTH DATA on photos while recording video

Selected video formats

'420f' 1920x1080, { 1- 60 fps}, HRSI:4224x2376, fov:106.748, gdc fov:106.440, supports vis, max zoom:123.75 (upscales @2.00), AF System:2, ISO:24.0-2304.0, SS:0.000015-1.000000, supports HDR, supports wide color, supports multicam, supports high photo quality>
'x420' 1920x1080, { 1- 60 fps}, HRSI:4224x2376, fov:106.748, gdc fov:106.440, supports vis, max zoom:123.75 (upscales @2.00), AF System:2, ISO:24.0-2304.0, SS:0.000015-1.000000,               supports wide color, supports multicam>

'420f' 1920x1080, { 1-120 fps}, fov:67.850, gdc fov:67.622, supports vis, max zoom:135.00 (upscales @2.00), AF System:2, ISO:24.0-768.0, SS:0.000015-1.000000, supports wide color>

'420f' 1920x1440, { 1- 60 fps}, HRSI:4032x3024, fov:101.896, supports vis, max zoom:157.50 (upscales @1.91), AF System:2, ISO:24.0-2304.0, SS:0.000015-1.000000, supports HDR, supports wide color, supports multicam, supports high photo quality>
'x420' 1920x1440, { 1- 60 fps}, HRSI:4032x3024, fov:101.896, supports vis, max zoom:157.50 (upscales @1.91), AF System:2, ISO:24.0-2304.0, SS:0.000015-1.000000,               supports wide color, supports multicam>

'420f' 3840x2160, { 1- 60 fps}, fov:106.748, gdc fov:106.569, supports vis, max zoom:129.12 (upscales @1.00), AF System:2, ISO:24.0-2304.0, SS:0.000015-1.000000, supports HDR, supports wide color>
'x420' 3840x2160, { 1- 60 fps}, fov:106.748, gdc fov:106.569, supports vis, max zoom:129.12 (upscales @1.00), AF System:2, ISO:24.0-2304.0, SS:0.000015-1.000000,               supports wide color>

'420f' 4032x3024, { 1- 30 fps}, HRSI:4032x3024, fov:101.896, max zoom:189.00 (upscales @1.00), AF System:2, ISO:24.0-2304.0, SS:0.000015-1.000000, supports HDR, supports wide color, supports highest photo quality>

x420 is 10-bit HDR. supports HDR relates to photos. Video HDR seem to be tradeoff over photo quality/HDR.

Original video bitrates

420f 4032x3024 25595440    30fps

x420 3840x2160 52633428
420f 3840x2160 47848568

x420 1920x1440 17141274
420f 1920x1440 15582977

420f 1920x1080 22498560    120fps
x420 1920x1080 12818995
420f 1920x1080 11653631

Recording bitrates

resolution   fps       original   doubled
==========   =====     ========   =========
1920x1080, { 1- 60     11653631   25000000
1920x1080, { 2-120     22498560   50000000
3840x2160, { 1- 60     50366912   100000000
4032x3024, { 1- 30     25595440   73500000

iPhone 16 Pro

Selected video formats

Camera name: AVCaptureDeviceTypeBuiltInTelephotoCamera
'x420' 1920x1080, { 1- 60 fps}, photo dims:{1920x1080,4224x2376}, fov:17.179, supports vis (max strength:Ultra), max zoom:123.75 (upscales @2.00), system zoom range:1.0-3.0, AF System:2, ISO:34.0-8704.0, SS:0.000015-1.000000, system exposure bias range:-2.0-2.0, supports wide color, supports multicam, supports Smart Style>
'x420' 1920x1440, { 1- 60 fps}, photo dims:{1920x1440,4032x3024}, fov:16.409, supports vis (max strength:Low), max zoom:157.50 (upscales @1.91), system zoom range:1.0-3.0, AF System:2, ISO:34.0-8704.0, SS:0.000015-1.000000, system exposure bias range:-2.0-2.0, supports wide color, supports multicam, supports Smart Style>
'x420' 3840x2160, { 1- 60 fps}, photo dims:{3840x2160}, fov:17.179, supports vis (max strength:Ultra), max zoom:129.12 (upscales @1.00), system zoom range:1.0-3.0, AF System:2, ISO:34.0-8704.0, SS:0.000015-1.000000, system exposure bias range:-2.0-2.0, supports wide color, supports Smart Style>
'420f' 1920x1080, { 1-120 fps}, photo dims:{1920x1080}, fov:17.179, supports vis (max strength:Low), max zoom:123.75 (upscales @2.00), system zoom range:1.0-3.0, AF System:2, ISO:34.0-1088.0, SS:0.000012-1.000000, system exposure bias range:-2.0-2.0, supports wide color>
'420f' 4032x3024, { 1- 30 fps}, photo dims:{4032x3024}, fov:16.409, max zoom:189.00 (upscales @1.00), system zoom range:1.0-5.0, AF System:2, ISO:34.0-4352.0, SS:0.000015-1.000000, system exposure bias range:-2.0-2.0, supports HDR, supports wide color, supports responsive capture, supports zero shutter lag, supports highest photo quality, supports Smart Style>

Camera name: AVCaptureDeviceTypeBuiltInUltraWideCamera
'x420' 1920x1080, { 1- 60 fps}, photo dims:{1920x1080,4224x2376}, fov:106.201, supports vis (max strength:Ultra), max zoom:123.75 (upscales @2.00), secondary:1.78, system zoom range:1.0-3.0, AF System:2, ISO:15.0-3600.0, SS:0.000014-1.000000, system exposure bias range:-2.0-2.0, supports wide color, supports multicam, supports Smart Style>
'x420' 1920x1440, { 1- 60 fps}, photo dims:{1920x1440,4032x3024}, fov:103.625, gdc fov:106.201, supports vis (max strength:Low), max zoom:157.50 (upscales @1.91), secondary:1.78, system zoom range:1.0-3.0, AF System:2, ISO:15.0-3600.0, SS:0.000014-1.000000, system exposure bias range:-2.0-2.0, supports wide color, supports multicam, supports Smart Style>
'x420' 3840x2160, { 1- 60 fps}, photo dims:{3840x2160}, fov:106.201, supports vis (max strength:Ultra), max zoom:129.12 (upscales @1.00), secondary:1.78, system zoom range:1.0-3.0, AF System:2, ISO:15.0-3600.0, SS:0.000014-1.000000, system exposure bias range:-2.0-2.0, supports wide color, supports Smart Style>
'420f' 1920x1080, { 1-120 fps}, photo dims:{1920x1080}, fov:106.201, supports vis (max strength:Low), max zoom:123.75 (upscales @2.00), system zoom range:1.0-3.0, AF System:2, ISO:15.0-1200.0, SS:0.000014-1.000000, system exposure bias range:-2.0-2.0, supports wide color>
'420f' 4032x3024, { 1- 30 fps}, photo dims:{4032x3024,8064x6048}, fov:103.625, gdc fov:106.201, max zoom:189.00 (upscales @1.00), secondary:1.78, system zoom range:1.0-5.0, AF System:2, ISO:15.0-3600.0, SS:0.000014-1.000000, system exposure bias range:-2.0-2.0, supports HDR, supports wide color, supports responsive capture, supports zero shutter lag, supports highest photo quality, supports Smart Style>

Camera name: AVCaptureDeviceTypeBuiltInWideAngleCamera
'x420' 1920x1080, { 1- 60 fps}, photo dims:{1920x1080,4224x2376}, fov:74.597, supports vis (max strength:Ultra), max zoom:123.75 (upscales @2.00), secondary:2.00, system zoom range:1.0-6.0, AF System:2, ISO:54.0-5184.0, SS:0.000014-1.000000, system exposure bias range:-2.0-2.0, supports wide color, supports multicam, supports Smart Style>
'x420' 1920x1440, { 1- 60 fps}, photo dims:{1920x1440,4032x3024}, fov:72.044, supports vis (max strength:Low), max zoom:157.50 (upscales @1.91), secondary:2.00, system zoom range:1.0-6.0, AF System:2, ISO:54.0-5184.0, SS:0.000014-1.000000, system exposure bias range:-2.0-2.0, supports wide color, supports multicam, supports Smart Style>
'x420' 3840x2160, { 1- 60 fps}, photo dims:{3840x2160}, fov:74.597, supports vis (max strength:Ultra), max zoom:129.12 (upscales @1.00), secondary:2.00, system zoom range:1.0-6.0, AF System:2, ISO:54.0-5184.0, SS:0.000014-1.000000, system exposure bias range:-2.0-2.0, supports wide color, supports Smart Style>
'x420' 3840x2160, { 1-120 fps}, photo dims:{3840x2160}, fov:74.597, supports vis (max strength:Medium), max zoom:129.12 (upscales @1.00), secondary:2.00, system zoom range:1.0-6.0, AF System:2, ISO:54.0-3456.0, SS:0.000014-1.000000, system exposure bias range:-2.0-2.0, supports wide color>
'x420' 1920x1080, { 1-120 fps}, photo dims:{1920x1080}, fov:74.597, supports vis (max strength:Medium), max zoom:123.75 (upscales @2.00), secondary:2.00, system zoom range:1.0-6.0, AF System:2, ISO:54.0-3456.0, SS:0.000014-1.000000, system exposure bias range:-2.0-2.0, supports wide color>
'420f' 4032x3024, { 1- 30 fps}, photo dims:{4032x3024,8064x6048}, fov:72.044, max zoom:189.00 (upscales @1.00), secondary:2.00, system zoom range:1.0-10.0, AF System:2, ISO:54.0-12096.0, SS:0.000014-1.000000, system exposure bias range:-2.0-2.0, supports HDR, supports wide color, supports responsive capture, supports zero shutter lag, supports highest photo quality, supports Smart Style>

Format notes

  • Less than HD formats excluded, insufficient quality

  • 30fps formats excluded (except 4K), insufficient quality

  • 240fps formats excluded, insufficient quality (binned, low light underwater makes long shutter thus motion blur)

  • x422 formats excluded, ProRes only

  • x420 formats are preferred, except 4K and except 120fps for Ultra Wide and Telephoto cameras

  • 4K 30 fps 420f formats included to capture highest quality 48MP photos while recording video

  • Telephoto camera doesn't support 48MP photos

  • HD video formats support taking 12MP photos

  • Ultra Wide camera 4/3 photo formats support Geometric Distortion Correction

  • Wide camera supports 120fps in UHD x420 10-bit HDR with "Medium" level of stabilisation (other cameras has "Low")

Photos

Camera Resolution HDR Live Photo
Telephoto 12MP
Ultra Wide 48MP
Wide 48MP

Videos - Photos

Camera HD Video Photo HD 120fps Video Photo HD 4/3 Video Photo UHD Video Photo UHD 120fps Video Photo 4K Video Photo
Telephoto HDR 6MP SDR 2MP HDR 8MP HDR 8MP SDR 12MP HDR
Ultra Wide HDR 7MP SDR 2MP HDR 8MP HDR 8MP SDR 48MP HDR
Wide HDR 6MP HDR 2MP HDR 8MP HDR 8MP HDR 8MP SDR 48MP HDR
⚠️ **GitHub.com Fallback** ⚠️