views:

526

answers:

2

I almost don't even know how to begin describing this question - I am completely baffled. Basically, I have a custom-built F4V video player that grabs an F4V via an HTTP request, then plays the video with some standard AS3.

Now, I have three sites on identical SliceHost slices, running the same OS, same PHP version, built on the same platform, with identical Apache settings, everything. On one of the sites (just one of them), the videos do not play when the player is first loaded, but rather the page must be refreshed to play the video, essentially playing it back from cache. Otherwise, it waits, as though it has never downloaded enough of the file to begin playback. Furthermore, on that same site, on one and only one of the videos, the audio plays but not the video, until about the third or forth time through. After that, the video plays alongside the audio.

I've moved the proven, working swf files from a functional site to the broken site and see the same result. I've uploaded the broken F4V files to the functional site and they work fine. I've made sure the HTML and Javascript that load the player are identical.

Is there something I'm forgetting to check that could cause this problem? Anybody with a little more knowledge of browser or flash caching?

Additional Information:
I added a nocache directive, although as you might have expected, that caused it to begin failing on the refreshes as well. I've been using HTTPFox to look at the requests, although nothing has come out of it. The only thing I can really gather is that it appears to be playing correctly when obtained from cache, but not when requested from the site. It does play correctly on the other sites, even when a request is made, however.

On sites where the request works correctly, HTTPFox shows the correct size (several MB) of data being returned in the request. On the offending site, it shows less than 1K of data being returned with the F4V request.

A: 

Edited as this is currently the top answer.

In this case the problem was GZIP being applied to one individual site. Other tings to look for are:

  • Caching
  • MIME Types
  • Protocol (version and SSL)
  • Compression

To identify problems such as this you can use tools such as Fiddler (however there are others especially for the non MS stack such as wireshark). Using a tool such as this will allow you to compare and contrast responses and requests in detail and even alter then replay them to narrow down the issue.

Lex
I added a nocache directive, although as you might have expected, that caused it to begin failing on the refreshes as well. I've been using HTTPFox to look at the requests, although nothing has come out of it. The only thing I can really gather is that it appears to be playing correctly when obtained from cache, but not when requested from the site. It does play correctly on the other sites, even when a request is made, however.
Travis
A: 

Here is the correct answer. It took me a moment to compare the HTTP requests more carefully and discover the problem. It appears that the server in question was attempting to gzip everything except images, due to a bad apache configuration. Changing the configuration to only gzip a few key file types solved the problem. Thanks for your help Lex.

Travis