iPhone 3GS Enable HD Video Recording on iPhone 3GS

Discussion in 'iPhone' started by Steel Dogg, Oct 28, 2010.

  1. Steel Dogg

    Steel Dogg New Member

    Joined:
    May 3, 2010
    Messages:
    23
    Likes Received:
    0
    Device:
    iPhone 4 (Black)
    Here is a way to get the phone to record video (and playback on the iPhone) at 1080×800 @ 30fps at up to 20Mbps. (up from the original 640×480 @ 3Mbps) (I am using the non-standard 1080×800 in order to keep the video at the right aspect ratio)

    For the truly impatient: download the pre-edited file HDVideo3GS.zip
    Jailbreak your device and install SSH
    Copy N88AP.plist to /System/Library/CoreServices/SpringBoard.app/
    Copy the 3 other plist files to /System/Library/PrivateFrameworks/Celestial.framework/N88/
    Reboot your iPhone 3GS

    One quick look at the ARM Cortex processor that the 3GS uses, it’s apparent that the chip is capable of handling 720p video encoding. So all we need to do is by-pass the artificial limitation Apple has imposed on the hardware.

    Here is how:

    • I am assuming your iOS device is running firmware 4.1, I have not tested this with older versions of iOS
    • Jailbreak your 3G/3GS with limerain or greenpoison. Install OpenSSH via Cydia.
    • SSH into your phone using the root account
    • Open /System/Library/PrivateFrameworks/Celestial.framework/N88/AVCapture.plist with a Plist editor
    • Under the AVCaptureMode_AudioVideoRecording key, set the width and height for the capture key to 1080×800, respectively. This value controls the dimension of the video it is encoded at.
    • Set the width and height for the preview key to 440×320. This value controls the size of the on-screen preview. It does not have any effect on the final video.
    • Set the width and height for the sensor key to 1920×1080. This value controls the active region of the sensor, so basically, we want to use the entire sensor. This source will be automatically downscaled to the proper resolution at encoding time.
    • Increase the encoding average bitrate to 20Mbps (20000000bps), this records a much larger video file (~ 2MB for every second of video)
    • Increase the encoding bitrate cap to 40Mbps. Also, lower the minimum quantizer from 19 to 15 or something, just for the heck of it.
    • Set the H264 profile from 3_0 to 3_1 (because wikipedia says so)
    • Save and close this file.
    • To make the phone playback the recorded HD video. Simply edit CameraRollValidator.plist and MediaValidator.plist, they can be found in the same place as AVCapture.plist. (If you don’t do this, the file can only be played back on your computer)
    • Replace 768 with 1280
    • And replace
    with
    • Save these two files.
    • Open /System/Library/CoreServices/SpringBoard.app/N88AP.plist with a Plist editor, and add the following under the capability node, this will enable HD recording from the camera app:
    • <key>720p</key>
    • <true/>
    • <key>hd-video-capture</key>
    • <true/>
    • If you are having a hard time figuring out where to make the changes, download the pre-edited file HDVideo3GS.zip Then simply copy the plist files to the correct location via SCP.
    • Reboot your iDevice.

    Edit1: Added instruction and updated zipfile to make recorded videos playable on the phone.
    Edit2: Updated resolution to 1080×800 to conform to the 4:3 aspect ratio.
    Edit3: .plist files links deleted!
  2. xX-SicKsKiLZz-Xx

    xX-SicKsKiLZz-Xx Active Member

    Joined:
    Jun 19, 2010
    Messages:
    2,871
    Likes Received:
    4
    Device:
    iPhone 4S (White)
    ok, distributing .plist files is illegal, so i suggest you just tell them how to do it, and delete ALL traces of that .zip

    Please Register or Log in to view images

  3. Steel Dogg

    Steel Dogg New Member

    Joined:
    May 3, 2010
    Messages:
    23
    Likes Received:
    0
    Device:
    iPhone 4 (Black)
  4. austers

    austers Well-Known Member

    Joined:
    Jan 7, 2010
    Messages:
    3,734
    Likes Received:
    456
    Device:
    3G iPod touch
    Any chance of a video of the changes?!
  5. Steel Dogg

    Steel Dogg New Member

    Joined:
    May 3, 2010
    Messages:
    23
    Likes Received:
    0
    Device:
    iPhone 4 (Black)
  6. thedj

    thedj Member

    Joined:
    Nov 29, 2009
    Messages:
    913
    Likes Received:
    8
    Device:
    iPhone 4S (Black)
    Does this work on 3.1.2?
  7. Steel Dogg

    Steel Dogg New Member

    Joined:
    May 3, 2010
    Messages:
    23
    Likes Received:
    0
    Device:
    iPhone 4 (Black)
    No, iOS 4.1 only!
  8. djspan

    djspan New Member

    Joined:
    Mar 31, 2010
    Messages:
    149
    Likes Received:
    0
    Device:
    iPhone 3GS (White)
    which part is the bitrate?
  9. nozz

    nozz Member

    Joined:
    Feb 14, 2009
    Messages:
    236
    Likes Received:
    0
    What if I want to record with 16:9 aspect ratio?
    Great tutorial btw!
  10. thekwlman11

    thekwlman11 New Member

    Joined:
    Jan 27, 2010
    Messages:
    289
    Likes Received:
    0
    Device:
    3G iPod touch
    Nozz, surely you would just change the height/width to a 16:9 ratio?

Share This Page