Enable HD video recording on iPhone 3GS

Summary:

  • Last updated December 2010 for iOS4.1, Click here for the newest release for iOS 4.2.
  • I added ‘Super’ high quality mode in rev4, which uses the camera sensor in still image mode  to capture video, so it will only record at 15fps, but the quality is amazing as evident in the above picture.
  • In ‘Super’ high quality mode (15fps), the camera sometimes makes a ‘clicking’ noise when focusing and then the video recording lags for half a second.  It helps if you close all other background apps.
  • You are recording at 1080×800, which is ~4:3 aspect ratio, just like the original video.
  • The video is a lot higher in resolution and bitrate than the original, thus the files are bigger, and it will take more power to encode.  Keep an eye on the disk space and battery life!  Also, disable background apps might improve performance.
  • if you email the video or send it to youtube using iOS, it will reencode it to a lower quality.  Use Pixelpipe from the appstore to upload in original quality, or download it to your computer to view the video in full resolution.
  • This hack is for iOS 4.1, I have not tested this with older versions of iOS.  But supposedly it works on 4.2 as well.
  • Someone made a cydia App called 3GS HD Enabler under the modmyi repo for the less technical inclined.

One quick look at the ARM Cortex processor that the 3GS uses [PDF Spec], 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 a way to get the phone to record video (and playback on the iPhone) at 1080×800 @ 30fps at up to 15Mbps.  (up from the original 640×480 @ 3Mbps)  (I am using the odd resolution of 1080×800 in order to keep the video at the right aspect ratio)

The quick method:
Jailbreak your iDevice, install Cydia, and search for the app ’3GS HD Enabler’.  Enjoy.

The manual method:
Jailbreak your iDevice and install SSH
Download the pre-edited file HDVideo3GS.zip.
Decide if you want HD or SuperHD, see comparison of different video mode.
Copy the 3 .plist files to /System/Library/PrivateFrameworks/Celestial.framework/N88/ (Backup your original!)
Respring your iPhone 3GS and enjoy HD video

Details, for the tinkerers:

  • 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.  Setting it to the full size (2048×1536 seems to turn on a special ‘photo mode’, which is slower than video mode, but the quality is much better)
  • 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.
  • 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 all instances of 768 with 1920
  • And replace  <key>MaxLevel</key><integer>30</integer> with  <key>MaxLevel</key><integer>31</integer>
  • Save these two files and respring your iDevice

Results:

Exhibitions, Conferences, Red Carpet and Parties

Hey guys, just a small update on what I have been up to lately.  September has turned out to be quite an exciting month!  On the 23rd, I was at Cologne for Photokina, where I played around with every camera I can get my hands on.  (Fuji’s X100‘s digital viewfinder is astonishingly sharp; the NEX5 stitches panorama faster and better than a quadcore PC; the Canon SX30 zooms 35x optically, and and the 200-500mm F2.8 lens from sigma is just ridiculous)

On the following day, I arrived at Nijmegen, The Netherland to work with Dalai and Martins prepping for a 3-day event called Cosmic Sensation.  We are responsible for making the 3D graphics that will be projected onto the dome with 6 high-powered projectors.  It was an intense week, as us three Blender artists worked 16 hour days to get it ready for the show.  But in the end everything paid off, people had a blast.

During our stay in Holland, all 3 of us went to Utrecht for the Sintel Premiere on the 27th where a lot of the big names of the Blender community graced the city.  It was quite inspiring talking to Colin, the director of the film; Jan, who single handily created the the sound and score for the film, and William Reynish, who turned out to be a bigger photo geek than I am.

Anyway, that was it for September.  I still have some flying scheduled for October:
27th: Turin, Italy – View Conference (4 hour workshop on Blender sfx)
30th: Amsterdam, Netherland – Blender Conference (one on computational biology, another on the dome)

Sintel Premiere

IMG_1869

Blender’s 3rd in-house short film was premiered last night in Utrecht, The Netherland.  and I was lucky enough to be a part of that!  More pictures on Flickr.

The movie – Sintel – is an amazing accomplishment, I was a bit worried that I’d spent the entire time looking for cloth intersection, rendering artifact and bad physics.  But as soon as the first scene fades in, it’s easy to let yourself go and enjoyed the movie.

Update: The movie is released, watch it online here: http://www.sintel.org/

Mastering Blender Game Engine

While Dalai and I are still working on the 400 page manuscript day and night (haha, no not really, but it’s fun to pretend that we are working hard on it), Amazon already has this soon-to-be-legendary book on a 35% discount.  So if you are remotely interested in Blender but is short on cash, why not pre-order this book today and be one of the first reader to email us about that spelling mistake on page 274.

The book will cover every BGE topic from graphics to shader, logic bricks to python, so there is something for everyone.

Play Game, Do Science

And finding a cure for cancer is definitely lvl 80.

My daily reading usually does not include anything from Science or Nature, but this article stood out among all the other academia mumble-jumbos.  In a nut shell, the paper described a software that evaluates protein conformations faster than any existing computer.  How?  By taking advantage of human brain’s immense cognitive power.  Researchers found that even a casual player (non-biochemist) can solve complex protein folding problems much faster than a computer.  (Ars has some very good background info explaining the biology aspect of the paper, take a look if you are unfamiliar with terms like amino-acid and hydrophilicity)

So a game called FoldIt is devised to takes advantage of of people’s boredom.  A series of incrementally difficult scenarios teaches players the basic mechanics of the game, then real data is streamed from online for player to solve.  Results are sent back for cumulative analysis.  So far, the result looks wonderfully promising.  It turns out, our monkey brains can easily out-perform a cluster of Intel i7s, both in accuracy and speed.

In the US, 200,000 Million (200Billion) hours are spent in front of a television, each year.  A total of 500 million hours were spent in Second Life in 2009, and a mere 100 million hours was spent in creating the entire Wikipedia.  Perhaps we can cure cancer in a week if we all just skip our weekly quota of Grey’s Anatomy?

Blender Workshop

We just wrapped up a full-day Blender workshop yesterday under the blazing sun of Pisa, Italy.  The seminar went smoothly and was well received.  A total of 35 attendees showed up despite the fact that the event was announced only a week prior.

In the morning, the attendees got a high level overview of what Blender can do, followed by a crash course on scientific visualization as applied to cellular biology and biochemistry as well as an extensive Python lesson.  In the afternoon, we moved to the computer lab and covered some of the Blender fundamentals, giving a lot of the attendees their first hands-on experience with Blender.

Even though this is my third time running such an event, there is still lots of rooms for improvement.  (For example, Blender 2.5′s UI was corrupt on some of the machines running older Ubuntu installations and Intel graphics chip, which made running the tutorials very challenging)

Photos of the event are on Pisaca.  Special thanks to the Pisa Linux User Group, without them, this workshop would not have been possible.