lighttpd forum lighty > FLV downloads, Flash & IE - netstream.close() not working

Posted by luke (Guest)
on 13.05.2008 08:20
Hi all,

I've been experiencing a rather strange issue. We have a typical setup 
where our Flash video player progressively downloads FLV files from our 
lighttpd servers (v1.4.19). Nothing fancy, just straight requests to 
static files (i.e. no streaming, no X-Sendfile).

The issue occurs using IE6 and IE7, and is triggered when the user 
watches multiple videos in sequence, without waiting for the previous 
one to finish downloading. The first two playback ok, however the 3rd 
video won't start until one of the previous ones have finished 
downloading. This is normal if you have 3 or more videos on the same 
page playing together... however we're reloading the page between each 
video.

After digging into the issue we noticed that Flash or IE continue 
download the file after the player has specifically killed the request. 
The download even continues after the player has been destroyed, such 
going to a completely different page. The download only stops at the end 
of the file, or when IE is closed.

Initially I thought the problem was due to IE and Flash, however after 
testing it off an Apache 2.2 server, the downloads are stopped expected 
- both programatically using Flash's netstream.close() and by going to a 
new page.

Does anyone have any ideas, perhaps it's a configuration issue?

We want to keep using Lighty because it's great, unfortunately this 
particular problem is fundamental to our requirements.

We're using Gentoo and Lighttpd v1.4.19 built using portage.

We've also been using "lsof | grep flv" to list the FLV files being 
currently served.

Luke.




Posted by Olaf van der Spek
on 13.05.2008 10:50
luke wrote:
> Initially I thought the problem was due to IE and Flash, however after 
> testing it off an Apache 2.2 server, the downloads are stopped expected 
> - both programatically using Flash's netstream.close() and by going to a 
> new page.
> 
> Does anyone have any ideas, perhaps it's a configuration issue?

Use a network sniffer (Wireshark) to look at what's happening on the 
network.
Posted by Perry (Guest)
on 13.05.2008 23:37
luke wrote:
> I've been experiencing a rather strange issue. We have a typical setup 
> where our Flash video player progressively downloads FLV files from our 
> lighttpd servers (v1.4.19). Nothing fancy, just straight requests to 
> static files (i.e. no streaming, no X-Sendfile).
> 
> The issue occurs using IE6 and IE7, and is triggered when the user 
> watches multiple videos in sequence, without waiting for the previous 
> one to finish downloading. The first two playback ok, however the 3rd 
> video won't start until one of the previous ones have finished 
> downloading. This is normal if you have 3 or more videos on the same 
> page playing together... however we're reloading the page between each 
> video.

We ran into this just today.  Adding this to the lighttpd config fixed 
it for us:

# Internet Explorer doesn't like FLVs being served with a MIME type
# of "application/octet-stream" which is the default
$HTTP["useragent"] =~ "MSIE" {
    mimetype.assign += ( ".flv" => "video/x-flv" )
}

Perry
Posted by luke (Guest)
on 14.05.2008 07:33
Perry wrote:

> We ran into this just today.  Adding this to the lighttpd config fixed 
> it for us:
> 
> # Internet Explorer doesn't like FLVs being served with a MIME type
> # of "application/octet-stream" which is the default
> $HTTP["useragent"] =~ "MSIE" {
>     mimetype.assign += ( ".flv" => "video/x-flv" )
> }
> 

Mate! You're a star!
Posted by Alex (Guest)
on 08.07.2008 14:50
Perry wrote:
> 
> We ran into this just today.  Adding this to the lighttpd config fixed 
> it for us:
> 
> # Internet Explorer doesn't like FLVs being served with a MIME type
> # of "application/octet-stream" which is the default
> $HTTP["useragent"] =~ "MSIE" {
>     mimetype.assign += ( ".flv" => "video/x-flv" )
> }
> 
> Perry

saved my skin! thnx!
Posted by Justin Munning (Guest)
on 18.07.2008 22:47
Guys,

I ran into this exact issue using an apache server.  mime.types already 
has video/x-flv listed for flv.

Has anyone heard of this happening for apache?  I know this is a 
lighttpd forum, but this is all I could find and you described my 
problem exactly!

Thanks,
Justin