Archive for the 'Macromedia Flash' Category

Flash Video Files (.flv) and IIS

I spent the afternoon scratching my head after moving some Flash video files from my dev machine up to the web. Being essentially multi-threaded I did do some other stuff as well so it probably wasn’t as big of a problem as I am making out. Anyway…

I uploaded the files and then the viewer application thing couldn’t access them. Within the application I was switching the source of the player by replacing its HTML in the DOM using JavaScript and thus changing the videos, at least it was supposed to. (My recent discovery of the Scriptaculous/Prototype libraries made this a joy by the way.) Because of this being a bit fancy I spent quite a while blaming that and meddling with it to no avail.

I eventually had an epiphany and checked the MIME types on the server. The gist of these is that IIS only serves files that it has a MIME type for which it matches to the file extension.

By default, .flv isn’t there and thus IIS doesn’t serve the file.

To remedy this:

  • Go to the site in question in the IIS snap-in
  • Right click and open the properties for the site
  • Go to the HTTP Headers tab
  • At the bottom of said tab is a ‘MIME Types’ button which you’ll be wanting to click at this stage
  • Add a new type with the file extension .flv and the MIME type of video/x-flv.
  • Press however many ‘Yes’, ‘Apply’, ‘Finish’ or ‘OK’ buttons you need to get rid of it all…

And voila… You should be in business.

RSS My Last.Fm

  • An error has occurred; the feed is probably down. Try again later.