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.

Advertisements

21 Responses to “Flash Video Files (.flv) and IIS”


  1. 1 Phil Winstanley October 13, 2006 at 9:52 am

    I had the same problem rece3ntly trying to server .dmg (Mac .exe) files from IIS 6.

    Sorted it in the end with the help of this: –

    http://support.microsoft.com/default.aspx?scid=kb;en-us;326965

  2. 2 Graham Pengelly October 13, 2006 at 6:39 pm

    The kb article also shows how to add wildcard mime types. I think I would personally be a bit worried if I didn’t know what file types my server might be serving and needed to use this.

    The flip side of this mime type business is that you can also prevent IIS serving files that you don’t want to make publicly available by removing their extension, or not adding it. I imagine this is how we keep the .config and .cs files to ourselves.

  3. 3 johnny krisma December 20, 2006 at 12:30 am

    how come I’ve seen the mime-type listed as flv-application/octet-stream in other parts of the web? Anyone know the difference?

  4. 4 Graham Pengelly January 11, 2007 at 5:24 pm

    Hi Johnny

    I don’t know the difference but I do know that video/x-flv certainly works 🙂

    Graham

  5. 6 Rafael - Brazil April 17, 2008 at 7:10 pm

    Uooollllll… very good.
    My site is working now!
    Thanks!

  6. 7 Matthew Lount May 1, 2008 at 11:51 am

    Nice! Years later and its still helpful!

  7. 9 cleek December 18, 2008 at 8:43 pm

    Thanks a lot, so simple and never figured it. ¡¡¡Great work!!!

  8. 10 ajaxx January 27, 2009 at 10:35 am

    hi Ive done the instructions above, but when i play the FLV video it si overcompressed, regardless the fact that i uploaded the original file, and when i download the flv from the web, its smaller file size than the original. What shold I do?
    Thanks in advance

  9. 11 Lawrance September 22, 2011 at 6:16 am

    Worked with very simple steps great!!!
    Thank You So Much…………………

  10. 12 video January 15, 2013 at 9:06 pm

    Hi there everyone, it’s my first pay a visit at this web page, and article is actually fruitful designed for me, keep up posting such articles.

  11. 13 elwoodmorquecho127.jimdo.com July 19, 2013 at 12:02 pm

    Simply a smiling visitor here to share the love.
    btw great design and style as well as superb post.

  12. 14 Eulalia July 22, 2013 at 6:07 am

    Hi there, I wish for to subscribe for this website to obtain newest updates, thus where can i do it please
    assist.

  13. 15 Boat Rental January 9, 2014 at 6:37 am

    What’s up, this weekend is fastidious in support of me, as this
    occasion i am reading this enormous educational paragraph here
    at my home.

  14. 16 Pure Logic Edmonton March 8, 2014 at 7:38 am

    Hola, that was a useful post! Lots of tremendous
    details, I am thrilled that I come across it.

    I am certainly going to bookmark your page! 🙂

  15. 17 my response May 6, 2014 at 2:11 am

    Hello, i think that i noticed you visited my weblog so i came to return the want?.I’m trying to to find issues
    to improve my website!I assume its adequate to make use
    of some of your concepts!!

  16. 18 link July 22, 2014 at 10:09 am

    I used to be advised this web site by means of my own step-brother. I’m now not specific if it submit can be created by them because nobody else notice these kinds of detailed around my personal problem. You are superb! Thank you so much!

  17. 19 Related Site July 24, 2014 at 12:20 pm

    Fantastic work! This can be a form of facts that ought to be shared throughout the internet. Waste on the look for search engines with no for a longer period placement that submit second! Think about it above along with consult with my site. Thank you Implies)


  1. 1 defmay { Estúpido IIS } Trackback on November 8, 2006 at 5:01 pm
  2. 2 IIS & MIME types « A bit of this, a bit of that… Trackback on February 21, 2007 at 12:03 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s





%d bloggers like this: