DON’T GZIP F4V’S 

SYMPTOMS

The other day we deployed a new site to the production servers only to find our video player was bugging out. Specifically in Firefox, it seemed that the file size and video length was not being interpreted correctly. Load complete events and video play complete events were being fired prematurely, if not instantaneously. It other browsers the bytes loaded of the net stream never updated, but the video played fine. It worked perfectly in our dev environment and had passed QA, but for some reason broke when deployed to production. This lead us to believe that it was environmental and  differences between the server configurations were at fault.

CAUSE

I’ve seen this type of thing before and wrote about it here. Using an HTTP proxy (I use Charles), I looked at the differences in responses to the F4V requests from the two servers. Both were returning a “plain-text” mime-type. Not a good thing, but still did not explain the differences in behavior. The only difference was the production server was using gzip compression for F4V files. I did a quick search on the web and found only two documented cases of malfunctioning F4Vs and gzip compression, so I figured it was worth writing about.

SOLUTION

The solution is to exclude F4Vs from gzip compression in your apache configuration. Unfortunately, we don’t have administration rights to out client’s servers, so we defaulted to the lower quality and slightly larger file size of FLV, which fixed the issue.

REFERENCES

  1. http://www.longtailvideo.com/support/forum/Setup-Problems/21791/MP4-and-Firefox-3-5-7-#msg143431
  2. http://stackoverflow.com/questions/1100888/f4v-player-works-on-every-site-but-one

AR From Across the Pond 

Looks like my fellow McCannite devs in Belgium beat us too it. If you want to try it out, download the QR code, then hit this page to launch the application. Good job guys.

Augemented Reality 

Today I spent some time playing with FLARToolKit, an AS3 port of the C based ARToolKit. If you have a webcam, launch the application, download and print this QR code PDF and place in front of your camera.


Flash AR Test from redblind on Vimeo.

I will post source once I clean it up.