«

»

Mar
23
2010

Enable your webserver to feed iPhone with MP4 videos

I’m using iPhone OS 3.x on my iPhone and recently i had problems to get my .mp4 files displayed in mobile Safari. I tried different settings for encoding the files but not a single one worked. When i clicked the link to the .mp4 file in mobile Safari, all i got was the “file can’t get downloaded” error. After some googling i found a clue that it might has something to do with MIME types and the apache server hosting the videos.

Solution:

  1. encode your videos for iPhone / iPod Touch (Compressor, Quicktime, Adobe Media Encoder, …)
  2. test them on the device (add the video to your iTunes library and upload it to your iPhone and watch it!)
  3. upload the video to your webserver
  4. make sure you have the following line in your apache config or in a .htaccess file in your directory on your webserver:
?View Code APACHE
1
AddType video/mp4 mp4 mp4v mpg4 m4v

That’s it, now progressively watching .mp4 videos from your webserver on your iPhone should work (again).

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>