iPhone "cannot play" .mp4 H.264 video file

AJB picture AJB · Jul 20, 2010 · Viewed 42.1k times · Source

I'm trying to setup a simple mobile page for a client with a link to an .mp4 video file. Lke so:

<a href="My_Video_File.mp4" target="_blank">Watch MP4 Video</a>

And then I've obviously got my video file sourced properly and the .mp4 has the following characteristics:

Dimension: 480 * 272
Codecs: AAC, H.264, MPEG-4 SDSM, MPEG-4 ODSM
Channel Count: 2
Total Bitrate: 991
Size: 11.4MB

But, the problem is when I click on the link iPhone says "Movie cannot be played." and doesn't tell me why.

Any help?

Thanks in advance.

Answer

AJB picture AJB · Jan 30, 2011

I figured this out finally.

The problem was partially to do with encoding but more to do with the dimensions.

I found out that if your .mp4 file is larger in dimension than 640*360 then the iPhone (iPad, iPod) won't even give the user the option to attempt to play it. They just get the X'd out play button icon.

Also, these devices only support .mp4's that are encoded with the baseline H.264 profile, or they can't be played.

Also, there's a bitrate limit of 1.5Mb for the iPhone, but it's suggested to keep the bitrate below 900kb.

If quality is less of a concern than size then you can use m4v's of larger dimensions but I believe the bitrate rules still apply.

Hope this helps somebody else.