Encoding video for the iPhone

Update: Or just download QuickTime 7.2 from Software Update and use QuickTime Player to export for Apple iPhone or Apple iPhone (Cellular) 🙂


None of my H.264 movies I make will play on my iPhone, because I make “QuickTime” movies with H.264. The trick is to make MPEG-4 movies and use the proper settings. Here is what I found works for converting my videos.

From Apple’s iPhone Page I extracted these steps:

  • File Menu -> Export movie
  • Choose Movie to MPEG-4
  • Click Options
  • File Format: MP4
  • Video Format: H.264
  • Frame Rate: Current
  • Key Frame: Automatic
  • Click Video Options…
    • Check Baseline (I left main checked)
    • Check Faster Encode

This made a .mp4 file. The final trick was changing my HTML to use the proper TYPE:

<object width="320" height="240" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
        codebase="http://www.apple.com/qtactivex/qtplugin.cab">
    <param name="src" value="http://www.geeksrus.com/movies/invisible_shield_iphone.mp4">
    <param name="controller" value="true">
    <param name="autoplay" value="false">
    <embed src="http://www.geeksrus.com/movies/invisible_shield_iphone.mp4"
        width="320" height="240"
        controller="true" autoplay="false"
        scale="tofit" cache="true"
        TYPE="video/mp4"
        pluginspage="http://www.apple.com/quicktime/download/"
    >
</object>

If you are on an iPhone, Check out this example. Its rather very cool, as it lets you know there is a video and then tapping it gives you a video UI!

3 comments

  1. With Export for iPod and Export for AppleTV, I was wondering when they were going to do this.

    I’m sure the Export for iPhone is a wifi version, and Export for Cell is EDGE. The problem still is, you end up with two files which isn’t really supported in iWeb unless I again sub categorize the pages and have a system by which I have:

    Movies Coral Coral’s First Birthday Click here for Web Click here for iPhone Wifi Click here for iPhone Edge

    Which I don’t want to do.

    The question is, how good will iPhone Wifi look on a Mac or PC. I’ll have to test and see.

  2. Have you had any luck with the autoplay parameter on the iPhone. As far as I can tell it is unsupported, ie set it to true, false, or wombat and no difference.

  3. I believe auto play is turned off by default because movies play in their own viewer, not directly on the page.

Comments are closed.