Sunday, January 6, 2008

Using FLV video on the web

A lot of the videos these days being streamed on the web is comprised of FLV format (Flash Video). It's easy to see why because it is so customizable. What I like about it the most is that it is easily manipulated within Flash. Just a great format.

While working with FLV for the first time awhile ago, there was one problem I had encountered that had me quite concerned at the time. I was trying to create a simple html file with a FLV video embedded in it using Dreamweaver. I inserted a SWF file into the html page as I always do with any Flash SWF file, but when I went to test the page by using "Preivew in ..." it didn't work. A "white box" appears in where the video should be playing. I tried inserting just the FLV video into dreamweaver directly, same result. I checked the SWF file and that played fine on it's own. I then used Flash to publish the corresponding HTML file to see if that would work. Sure enough it did. That gave me some relief as I was afraid it might have been some coding in the "AC_RunActiveContent.js" file. So instead of using the preview feature in Dreamweaver, I saved the HTML file and viewed it by double clicking it. It worked.

After that I uploaded it to the web server running IIS6. Sure as the sky is blue, nothing seems to work right with technology on the first try. Being hosted on IIS, the page with the FLV video would display the "white box" again. IIS6 was somehow restricting the content. To enable FLV video playback on IIS you must add FLV as a MIME type for the particular website you hosting.
  1. Go to [Properties] of the website in IIS
  2. Under [HTML Headers] tab, click on [MIME Types...]
  3. Click [New...]
  4. Enter ".flv" for the Extension and "video/x-flv" for the MIME Type

Now FLV videos will play on your hosted IIS website(s).

Adobe Flash CS3