« Apple DVD Player 4.6 Available | Main | Why test your website in different browsers? »

Faux .MP4 Problem with Safari

There is a lot of (dis)information and even an online petition about how Apple's Safari web browser will not play MPEG-4 (.mp4) files. In this quick tutorial I'll show you the solution to this very simple problem.

The problem is this. You've uploaded an MPEG-4 (.mp4) video file (more about MPEG-4 later) to your web server, you've created the link to the file, you open your browser, in this case Safari, and nothing loads except a bunch of text that is unintelligible (see image below). You then open Firefox, Internet Explorer and any other browser you can find, and find that the file opens with no problem.

What's the problem? How can Safari, Apple's own browser, not support MPEG-4? You start looking for answers online and find a petition about how Safari doesn't support MPEG-4 and plenty of other people with the same problem.

Unfortunately, this problem is related to your web server and not Safari itself. The web server doesn't recognize the content type of the .mp4 file thus giving generic text. To fix the problem, you must open, or create, a .htaccess file in the root directory of the server and add the following lines:

AddType audio/mpeg mp3
AddType audio/mp4 mp4

Once that is done, the files will open as they should. If you don't have root access to your web server, you may have to contact your web host.

More about MPEG-4: MPEG-4 is the global multimedia standard, delivering professional-quality audio and video streams over a wide range of bandwidths, from cell phone to broadband and beyond.
MPEG-4 was defined by the Moving Picture Experts Group (MPEG), the working group within the International Organization for Standardization (ISO) that specified the widely adopted, Emmy Award-winning standards known as MPEG-1 and MPEG-2. Hundreds of researchers around the world contributed to MPEG-4, which was finalized in 1998 and became an international standard in 2000 and included in QuickTime in 2002.

Posted by gBrad on May 19, 2005 08:50 AM | Permalink

Social Bookmarking

Add to: Linkarena Add to: Digg Add to: Del.icio.us Add to: Reddit Add to: Simpy Add to: StumbleUpon Add to: Slashdot Add to: Netscape Add to: Furl Add to: Yahoo Add to: Google Add to: Blinklist Add to: Blogmarks Add to: Technorati Add to: Newsvine Add to: Ma.Gnolia Add to: Netvouz Information

Comments

I've created a simple, plain text doc and pasted in the two lines shown above "AddType audio/mpeg mp3
AddType audio/mp4 mp4".

I saved it as ".htaccess" and placed it in the root of my webserver folder but my mp4's still won't play. Is there something I left out?

Posted by: clark | July 5, 2005 02:47 PM

I got it! I added the AddType lines to the httpd.conf file and now my mp4's can be viewed in Safari!!

WOO HOO!!!!

Posted by: clark | July 5, 2005 02:58 PM

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Recent Entries

AskMe: Have a computer Q?

Send me an email: brad -at- gbradhopkins dot com