Please ignore this post if you want to shoot at 60fps as this isn't about that. It is about the results of my modifying the 'AVCaptureSession.plist' on my iPod touch 5g to improve the video capture framesize, low-light performance, and resolution.
Thanks to Werner's posts on iphonelife.com, I've modified the 'AVCaptureSession.plist' file on my iPod touch 5g (the most recent version) running iOS 6.1.2 with very successful results. The iPod5 has a 5MP camera sensor (like the iPhone4), but has the Apple A5 silicon including the 800MHz dual-core Cortex-A9 (like the iPhone4S), and a 1136x640 screen (like the iPhone5), so it combines bits of several iPhone generations.
First off, the folder on the iPod5 is in the same path as on the iPhone5, but it is named N78 instead of N42.
I decided to use the AppStore app ProCam (usually £0.69 / US$0.99, sometimes free for a short period) for my tests as it allows you to choose from four different standard video modes in the app as well as four different frame rates for those modes (30, 24, 15, 5 fps). I did buy CameraTweak from Cydia as well but was very underwhelmed with what it added to the normal Camera app.
The four video modes ProCam offers are: Full HD 1080p (standard 1920x1080 mode using only central area of sensor), HD 720p (standard 1280x720 mode using similar size central area as 1080p mode), VGA 640x480 (gives same full field-of-view as camera mode and is the "best" official video mode using the full area), Low 480x360 (also gives full field-of-view). I left the 1080p and 720p modes alone and tweaked the VGA and Low modes as ProCam already expects a 4:3 aspect ratio with those modes so the preview display will be correct.
After much trial and error with various resolutions, noise reduction, bitrate, framerate etc, I have found that Temporal Noise Reduction is the single most important setting when capturing using the full sensor area of 2592x1936 (it has a 5MP sensor).
With Temporal NR off, it can rescale to any resolution up to the highest the encoder can support at a full 24fps without any dropped or duplicated frames (I videoed Werner's 60fps video file to check every frame captured and all frames were unique). Whereas the limit for his iPhone5 encoding resolution was 1664x1248, the highest my iPod5 could handle was 1656x1242 which worked every time (with TempNR off). while 1664x1248 always failed. I didn't test 1660x1245 though as I don't like the idea of an odd number of pixels!
The actual number of pixels of these resolutions is woth mentioning:
1656x1242: 2,056,752
1664x1248: 2,076,672
1920x1080: 2,073,600 (highest officially supported mode)
Like I say, 1656x1242 worked perfectly at 24fps every time. I assume there is some hardware limitation (or some setting in the plist file I didn't look at) which prevents 30fps from working properly as choosing that caused serious juddering.
Enabling Temporal NR caused a serious slowdown due to I assume the CPU overhead of the extra work needed for each frame. I tested at various resolutions with the following results:
1024x768: 24 fps, no dropped frames in 24fps mode
1088x816: 23.7 fps average, resulting in nasty judders every two or three seconds in 24fps mode
1152x864: 22.2 fps average, frequent judders in 24fps
1280x960: 19.3 fps average, terrible in 24fps mode, perfect in 15fps mode
1440x1080: 16.3 fps average, no dropped frames in 15fps mode, ideal if 15fps is enough
1600x1200: 13.8 fps average, getting too slow to be considered a video now
1632x1224: 13.4 fps average, highest resolution which still worked normally
1640x1230: preview always freezes and ProCam is very slow to respond
1648x1236 and higher: no video is saved
So with Temporal NR enabled, 1024x768 @ 24fps seems like the ideal option. If you're prepared to drop to 15fps then the resolution can be upped to 1440x1080.
The end result is three optimal modes on the iPod5:
a) 1600x1200 @ 24fps with TempNR disabled (I prefer "standard" resolutions)
b) 1440x1080 @ 15fps with TempNR enabled
c) 1024x768 @ 24fps with TempNR enabled
I went with (a) and (c) as I don't particularly like 15fps.
The final modified 'AVCaptureSession.plist' file had these sections changed (I kept 17Mbps for 1600x1200 like the default 1920x1080 as they are very similar size, and chose 7.5Mbps for 1024x768):
<key>AVCaptureSessionPreset640x480</key>
<dict>
<key>Description</key>
<string>Back Facing 640x480</string>
<key>LiveSourceOptions</key>
<dict>
<key>Binned</key>
<false/>
<key>Capture</key>
<dict>
<key>Height</key>
<integer>1200</integer>
<key>Width</key>
<integer>1600</integer>
</dict>
<key>ChromaNoiseReduction</key>
<true/>
<key>MinFrameRate</key>
<integer>24</integer>
<key>Preview</key>
<dict>
<key>Height</key>
<integer>640</integer>
<key>Width</key>
<integer>852</integer>
</dict>
<key>Sensor</key>
<dict>
<key>Height</key>
<integer>1936</integer>
<key>Width</key>
<integer>2592</integer>
</dict>
<key>TemporalNoiseReductionMode</key>
<integer>0</integer>
</dict>
<key>VideoCompressionProperties</key>
<dict>
<key>AllowFrameReordering</key>
<false/>
<key>AverageBitRate</key>
<integer>17000000</integer>
<key>H264EntropyMode</key>
<string>CABAC</string>
<key>MaxKeyFrameIntervalDuration</key>
<integer>1</integer>
<key>NumberOfParallelCores</key>
<integer>2</integer>
<key>NumberOfSlices</key>
<integer>2</integer>
<key>Priority</key>
<integer>80</integer>
<key>ProfileLevel</key>
<string>H264_High_4_1</string>
</dict>
</dict>
and also
<key>AVCaptureSessionPresetMedium</key>
<dict>
<key>Description</key>
<string>Back Facing Medium Quality Video</string>
<key>LiveSourceOptions</key>
<dict>
<key>Binned</key>
<false/>
<key>Capture</key>
<dict>
<key>Height</key>
<integer>768</integer>
<key>Width</key>
<integer>1024</integer>
</dict>
<key>ChromaNoiseReduction</key>
<true/>
<key>MinFrameRate</key>
<integer>24</integer>
<key>Preview</key>
<dict>
<key>Height</key>
<integer>640</integer>
<key>Width</key>
<integer>852</integer>
</dict>
<key>Sensor</key>
<dict>
<key>Height</key>
<integer>1936</integer>
<key>Width</key>
<integer>2592</integer>
</dict>
<key>TemporalNoiseReductionMode</key>
<integer>1</integer>
</dict>
<key>VideoCompressionProperties</key>
<dict>
<key>AllowFrameReordering</key>
<false/>
<key>AverageBitRate</key>
<integer>7500000</integer>
<key>H264EntropyMode</key>
<string>CABAC</string>
<key>MaxKeyFrameIntervalDuration</key>
<integer>1</integer>
<key>NumberOfParallelCores</key>
<integer>2</integer>
<key>NumberOfSlices</key>
<integer>2</integer>
<key>Priority</key>
<integer>80</integer>
<key>ProfileLevel</key>
<string>H264_High_4_1</string>
</dict>
</dict>
(the indenting has been lost I'm afraid)
With those changes, in ProCam it is easy to switch between the standard (inferior) 1080p and 720p modes at up to 30fps, or choose either of the new full sensor area modes which work at 24fps: "VGA" which is 1600x1200 at 17Mbps with TempNR disabled, and "Low" (actually the Medium section in the plist file) which saves at 1024x768 with TempNR enabled at 7.5Mbps.
The new modes provide the expected much improved low light performance from using the full 2592x1936 sensor area as well as having a much wider field of view than the normal 1080p mode.
Many thanks to Werner for his posts on iphonelife.com for the information needed which allowed me to do the above.