We have an .mp4 video hosted on a web site. I can play back the video from the production version of the web site, but not the test version of the site.

The production web site has the .mp4 MIME type as video/mpeg, which apparently is incorrect -- see here. Whereas the test server has the MIME type set correctly -- video/mp4 -- but media player says it can't play the file. (And changing the MIME type to match the production web site doesn't fix the issue.)
Which would seem to indicate the MIME type is not the problem.

According to this Microsoft Knowledge Base article, the .mp4 file format is not supported, even in Media Player 12 ... unless you install a codec. But, as noted, playback does work from the production site ... and, if I right-click on the video and download it to my desktop, I can play it back from my desktop as well.
Which would seem to indicate that the codec (or lack thereof) is not the problem.

... but I can play the video (from the test web site) it if I install a codec pack.

Needless to say, I'm confused. Can anyone shed any light?

Windows 7 (Enterprise) x64
Media Player 12
Windows Server 2008 R2 / IIS 7.5

  • I suggest that you trace both network conversations with Wireshark, and see if you can spot a difference. – Tim De Baets Apr 18 '14 at 20:48
  • I suggest comparing the two files in question with MediaInfo. – Daniel B Jul 7 '14 at 13:17
  • @TimDeBaets Thanks. I used Fiddler -- this was before I saw your comment -- and that put me on the right track. See my answer below. – David Jul 7 '14 at 13:44
  • @DanielB I did a binary compare. The content wasn't the problem as it turns out (see my answer below). – David Jul 7 '14 at 13:45

In the event someone has a similar issue ...

As it turns out the problem was related to digital certificates on the server(s).

On the production box, the certificate name matches the DNS name. On the test boxes, it did not. (The test servers each host a number of test web sites.) So you'd get a certificate ("name mismatch") warning. BUT after dismissing the warning you could still download static content of other types -- we have PDFs and images (in various formats) that all worked fine -- it was just Media Player that, for whatever reason, wouldn't work.

Our server admins had assured me that once you dismissed the certificate warning, the certificate name mismatch should no longer be a problem. And that seemed reasonable to me and in line with what I knew, otherwise I'd have mentioned that in my original post.

But when I tried accessing the MP4 file with Fiddler running, I got a second certificate mismatch error popup (from Fiddler) ... and then after I said "ignore this error and continue" the video did in fact play.

So my best guess is:

  • the Media Player download request was failing silently because of the name mismatch (instead of popping up another warning dialog)
  • ... resulting in invalid content
  • ... resulting in the error message implying there was a codec issue.

It seems to me that several things went wrong here.

  • The certificate should not have been a problem, since I had already instructed the browser (IE as it happens) to ignore the "error".
  • Even if it was a problem, I don't understand why I didn't just get another certificate warning (until I tried hitting the site using Fiddler).
  • If the error had been trapped correctly within WMP, I should have gotten a different (less misleading) error message.

But the certificate was about due for renewal ... so when it was renewed we had the site name added as an "alias" (Subject Alternative Name aka "SAN") on the cert. So we no longer get the certificate name mismatch warnings on the test site(s) ... and the video plays just fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.