Video Streaming – installing on IIS and Apache

After we understand what video stream is all about and we wrote our first piece of SWFObject in Javascript. let’s try to have this working on our servers, of course that such things tend to fail. But let’s understand why…

First thing we need to understand is whether such failures occur due to my code, file format or server configuration.
let’s have a simple check trying to access the file directly using our browser.


configure your IIS to serve the following files: swf and mp4 using Static Content

<add name="FlashFiles" path="*.swf" verb="*" modules="StaticFileModule" scriptProcessor="" resourceType="File" requireAccess="Script" />
<add name="VideoFiles" path="*.mp4" verb="*" modules="StaticFileModule" scriptProcessor="" resourceType="File" requireAccess="Script" />

Setting handler(s) won’t be good enough, requesting the server again will return “404.3 – mime type missing”.
Don’t worry Adding new mime type to IIS 7 – is easy:

            <mimeMap fileExtension=".mp4" mimeType="video/mp4" />


While installing the static content on our static servers (apache) – we’ve found out that requesting the files from firefox return with “no content length” and “incorrect mime type”
adding the correct mime type to the /etc/mime.type

video/mp4     mp4

Check the Request\Response we’ve found out that our servers are still returning compressed response , googling it find out that Firefox cann’t handle gzipped video stream,
compression was selectively disabled by adding the following line to /etc/httpd/conf.d/static.d/static.conf:

SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|mp4)$ no-gzip dont-vary

Apache solution provided by Tomer G.


Shani Raba

Juggling between Performance Optimization, Agile Training, Continuous Delivery, Get Things Done. Role: Group Leader. Moto: Love your coders.