Save space on your iPhone by re-encoding movies and TV shows
If you encode your own video for watching on various devices and you're looking to save every last MB on your iPhone, it could be worth your time to re-encode at least some of your larger files with more conservative settings. While I, for example, have been copying the iTunes Store's settings and encoding my DVD movies at full dimensions and about 1500 Kbps to really let H.264 shine, the truth is you don't need anywhere near that much data to watch quality video on an iPhone's display. By re-encoding your videos and perhaps keeping them in a special iPhone playlist for synching, you can bring even more of your favorite videos with you in a fraction of the space. Unfortunately, you can't re-encode videos you've purchased from the iTunes Store because of the DRM. This how-to primarily applies to video you download from the web or encode yourself from DVD movies and other sources.To keep things simple, I'll use Blade Runner as our encoding guinea pig (which runs a length of 1:56) and Handbrake for all the encoding. Following are a few sample screenshots of how far you can compress a movie, along with the settings you can use in apps like Handbrake and TUAW favorite VisualHub to try this out for yourself.
These are encoded at 100, 200 and 350 Kbps and 480 pixels wide (the width of the iPhone display in landscape layout) from the top down:

Obviously, the 350 Kbps shot has a bit more detail than the other two in this particular scene, but the 100 Kbps movie on a whole is very watchable. Now here's the kicker - the difference in file size is incredible: This movie encoded at 1500 Kbps and full resolution weighs in around 1.5GB, but using these newer settings knocks the file down to around 190 MB (for the 100 Kbps file), 300 and 400 MB, respectively. That means you could easily fit anywhere from three or four movies (at the highest quality 350 Kbps setting) to as many as six movies (at the lowest 100 Kbps setting) in the same space as the original high-quality version. That's a huge difference, and a lot more entertainment in your pocket for those long commutes and plane flights.
If you want the full list of iPhone-optimizing settings to use for encoding your videos, here's a list that I used for this test case:
- width to 480 and maintain aspect ratio
- anamorphic off
- de-interlace on (interlacing is for devices like traditional TVs; you don't need it for your computer display or devices like iPod or iPhone)
- x264 (otherwise known as h.264, the high-quality codec/video format used for iTunes Store videos)
- 2-pass encoding on (while this takes more time, it maximizes the quality of your final video file by basically giving Handbrake or your video compressor of choice two chances to get all the tricky compression math just right. This isn't necessary, but it will help you squeeze as much quality as possible into a smaller file.)
Share
If you encode your own video for watching on various devices and you're looking to save every last MB on your iPhone, it could be worth...
Add a Comment
I think the answer to #10 is that you have to set it to h.264 baseline standard low complexity. There are different h.264s optimized for different devices. The iPod/iPhone uses the "baseline" standard, its simpler for the hardware to decode. Handbrake now gives it as an encoder option.
September 13 2007 at 1:25 AM Report abuse Permalink rate up rate down Reply@MacBookOwner, so I can use mp4/ffmpg instead of h.264 and it'll still load/play fine on the iPhone?
I followed the directions from the post and the fans went CRAZY on my bf's 2.2GHz C2D. Activity Monitor said it was using 185% of the processor. This is his new baby so I didn't want to cook his battery and kept pausing it to cool down.
On a sidenote, think it'd be OK to remove the battery while I finish this first attempt up?
@MacBookOwner, so I can use mp4/ffmpg instead of h.264 and it'll still load/play fine on the iPhone?
I followed the directions from the post and the fans went CRAZY on my bf's 2.2GHz C2D. Activity Monitor said it was using 185% of the processor. This is his new baby so I didn't want to cook his battery and kept pausing it to cool down.
On a sidenote, think it'd be OK to remove the battery while I finish this first attempt up?
""I remember implicitly hearing Steve Jobs at Macworld talk about H.264 and how "you can have one file for everything from a big screen to a cell phone.""
I thought that presentation meant that the same codec could be used, not that you'd want to use the same file over and over. Your point illustrates that you'll often get better results if you optimize your file for a given task. You probably wouldn't want to use the video made for a flip phone on an HDTV.
@ #12:
I have personally ripped files at 720 px wide (in my vain attempt to rip ONCE, play many) using Handbrake and they've played wonderfully on my iPhone.
James, most theatrical movies on DVD are encoded progressive scan, but many other types of DVDs are not.
A lot of TV shows are simply encoded as 480i because that's what was recorded in the original production, or if it was edited in 480i video. TV shows that were filmed and edited in film, or recorded for HDTV in mind, are very likely to be coded as progressive.
I've been using QT Pro's Export to iPhone option on my existing movie collection. This seems to work OK, other than the obvious second-file annoyance, but while watching these movies on the iPhone after a while the video and audio get out of sync. Anyone else experience this and/or have a solution?
August 12 2007 at 8:26 PM Report abuse Permalink rate up rate down ReplyDavid,
I have used both the h.264 setting and the standard mp4/ffmpeg settings on HandBrake, (and converted without the h.264 setting in Visual Hub, and both load fine onto the iPhone. I think, as you noted, the real limiting factor is that HandBrake, for example, will default to the DVD resolution (over 640), which the iPhone can't read.
I'm still not convinced about the h.264 setting for the iPhone; I realize its the latest and greatest, but the encoding takes 4 to 6 TIMES the time it takes without (i.e. 30 minutes vs. 3 hours on a C2Duo)that setting. I'd be interested to know what the real benefit is for such a small screen.
"x264 (otherwise known as h.264"
No - x264 is a free software library. h.264 is a codec.
Okay, so Handbrake for encoding video from a DVD. I've downloaded it, but have not used it as I have no DVDs I wish to rip just yet.
But what program is recommended for the Windows XP user who just wants to convert his already-existing video files into an iPhone-optimal-format?
A program I was using for my Palm T|X (Pocket DVD Wizard) does a passable job when I select "iPod" settings (the "iPhone" setting, while actually being higher-quality, automatically distorts the video into the iPhone aspect ratio--foul!), but it's not great and there are no settings to tweak. Rather a binary selection: use it as is, or don't at all.
Hot Apps on TUAW
Deals of the Day
more deals- Verizon Leather Sleeve for Tablets for $4 + free shipping
- Wicked Jaw Breaker Noise-Isolating In-Ear Headphones for $6 + free shipping
- Refurb Apple MacBook Air Laptops: 12" 64GB SSD for $699 + free shipping
- JVC Motion Sensing Clock Radio with Dual iPod Docks for $55 + free shipping
- Apple iPhone Headset with Mic for $4 + $2 s&h
- Refurb Apple iPod nano 8GB MP3 Player for $99 + free shipping, 16GB for $119
Software Updates
more updates- EFI Firmware Update brings Lion Internet Recovery to 2010-model Macs
- OS X Lion 10.7.3 released with Safari 5.1.3, Wi-Fi bug fix
- Aperture updated to 3.2.2, addresses Photo Stream issue
- Apple updates Keynote to address Lion issues
- Google Search app gets new look on iPad
- Apple releases Apple TV Software Update 4.4.3



24 Comments