Serving smaller video when closing in on bandwidth limits

I posted experiences with trying to serve a smaller videofile if I'm
getting close to my monthly bandwidth allowance. Using Apache logfiles
to track served size, and PHP to generate a .mov file (which is really
a SMIL file in disguise). Comments very welcome, I'm just hacking
around here…