Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

FLV doesn't work online (IIS MIME problem)

26 replies [Last post]

The link (http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_19439) provided by Dustin above worked for me on WIN2003. Thanks!

We got the windows server working. The getfile.asp program above works for small files but does not support large files. This expanded version works for any size file as it chunks it down in 32K chunks. Note I changed the path and used \ rather than /.

<%
Response.ContentType = "video/x-flv" ' arbitrary
fn = request.querystring("fname")
FPath = server.mappath("\TestCourse\") & "\" & fn
Response.AddHeader "Content-Disposition","attachment; filename=" & fn
Set adoStream = CreateObject("ADODB.Stream")
chunk = 32000 ' ? Optimum chunk size ?
adoStream.Open()
adoStream.Type = 1
adoStream.LoadFromFile(FPath)

iSz = adoStream.Size

For i = 1 To iSz \ chunk
Response.BinaryWrite adoStream.Read(chunk)
Response.flush
Next

If iSz Mod chunk > 0 Then
Response.BinaryWrite adoStream.Read(iSz Mod chunk)
Response.flush
End If

adoStream.Close
Set adoStream = Nothing
Response.End
%>

My problem now relates to the rendering of the flash video player. On a random basis we get a broken player. An image of the broken player is at:

http://www2.apisenterprise.com/testcourse/BrokenScreen.jpg

Note the video area is the same width as the progress bar. My guess is some variable is not getting set in time with the correct width. It randomly happens from various hosts and on various PCs. All hosts are IIS based and all PCs are Windows XP with IE7.

@Rich Helms
try set:

s1.addVariable("width","300");
s1.addVariable('height','170');

and to make your code really safe, wrap the creating code in a function, place it in the head,
and call it in the <body onload this resolves most timing issues!
for examples of such functions please checkout the source of some of the [url=http://home5.inet.tele.dk/nyboe/flash/mediaplayer/]demos[/url]

The demo code is a huge help. Thanks

One other small question. You can set a JPG to show before the video. It looks like the same shows after the video is done.

Is there a way to set that the last frame of the video stays when the video ends. We do this today with all of the other video support.

Thanks

@Rich Helms
no, im afraid no settings of the players will allow the last frame to stay...
you will have to generate/grab a picture of the last frame or come up with a modding of the player to do it internally. but i personally have no idea on how either of this could be done.

Hi

I work with Rich Helms and i have another question about displaying images before and after the playing of the video

I know that you can have a image for the player that appears when the player is stopped.

Can I have a differnet image appear while loading the video.

Thanks

@Stephen,

Have you experimented with preroll/postroll images to see if that would give you the effect that you want? There's quite a bit of functionality there, that if creatively applied, will give many effects.

@Stephen Spencer
to have a different image appear before and after the video you should try some experiments with the [url=http://www.jeroenwijering.com/extras/advertisements.html]pre/postroll ad-functions[/url] introduced in the v.3.9 player
i havent personally tried those yet, but a few users have reported successes.

And the overlay is nice too, but the user does have to click on that ominous black circle to make it disappear.

i like some post from this page..

Thanks all for the MIME setting, 3 weeks of trying to figure out why all of my players stopped playing FLV video is over.

I cannot get this to work. my mime type is flv-application/octet-stream. The generated feed shows this. However if I edit the feed and change the mime type to video/x-flv it works perfectly. The mime type listing in IIS is:

extension: .flv
MIME type: flv-application/octet-stream

I am running IIS. any thoughts or suggestions would be helpful.

Thank you for the code
It was great help

Thank you for the code
It helps a lot

I read the FLV from the server's filesystem in a Java Servlet and stream it out to the client.
Even tough Mime Types et all are set correct, even with a Content-Disposition header having a "filename",
I still need to trick the player by having a ".flv" at the end of the Url, so
http://myserver/webapp/StreamServlet/25
does not work, but adding a "dummy parameter"
http://myserver/webapp/StreamServlet/25?video.flv
will get it to run. I guess the player is somehow interpreting the URL ?
Cheers, Tom.

@Tom Eicher
make sure you set the "type" flashvar...

from the [url=http://www.jeroenwijering.com/extras/readme.html]readme[/url]:

type (mp3,flv,rtmp,jpg,png,gif,swf,rbs,3gp,mp4,m4v): The players determine the type of file to play based upon the last three characters of the "file" flashvar. This method doesn't work if you use database id's or mod_rewrite to retrieve the files. Therefore you can set this flashvar to tell the players of which filetype the file you want to play is. The type is also assigned to every item in a playlist. If no match is found, the player assumes it loads a playlist.

the .asp doesn't work for me, and neither the .htaccess file. On the webhost of a friend of mine it al works perfectly.
Maybe I'm doing something wrong?

I just created a file .htaccess. I only added "AddType video/x-flv .flv". Should I also add other lines to make the .htaccess file to work?

It would seem that maybe a new patch has messed this up again? I've got a brand new box, fully patched (Windows 2003 SP2, etc). I've tried both MIME configurations (video/x-flv and flv-application/octet-stream), as well as the .NET 1 and .NET 2 tricks... and none seem to work.

The player loads and when you hit play it says 'buffering video', but nothing happens. I'm using the project file from: http://blogs.ugidotnet.org/kfra/archive/2006/11/26/57225.aspx as a test to ensure it's not a problem with my code.

Any ideas?

I am using .flv player. When I am run in my localhost then it's run properly, But after uploaded on the my dedicated server and run in my browser, the browser says 'buffering video', but nothing happens.

Any solution?

Please send solution.

Thanks

*Manoj Sevda :"I am using .flv player. When I am run in my localhost then it's run properly, But after uploaded on the my dedicated server and run in my browser, the browser says 'buffering video', but nothing happens."

i have the same problem if anyone can come with a suggestion it would be appreciated

Tom Eicher :

I read the FLV from the server's filesystem in a Java Servlet and stream it out to the client.
Even tough Mime Types et all are set correct, even with a Content-Disposition header having a "filename",
I still need to trick the player by having a ".flv" at the end of the Url, so
http://myserver/webapp/StreamServlet/25
does not work, but adding a "dummy parameter"
http://myserver/webapp/StreamServlet/25?video.flv
will get it to run. I guess the player is somehow interpreting the URL ?
Cheers, Tom.

!

I loooooooooove you
truely !!

I don't know you but I love you !

I spent 5 hours on this #$£³%&@ problem, and you had the answer right !

thank you so much !!!

i'm having an issue on http://www.afunnysite.com i'm trying to block bandwidth thieves
but it doesn't work,
i'm on linux using server config (it works for jpg and gif, not for flv

RewriteCond %{HTTP_REFERER} !^http://(www\.)?hotterbabes.com(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?bigupload.com(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?uploadia.com(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?afunnysite.com(/)?.*$ [NC]
RewriteRule .*\.(jpg|gif|flv)$ http://srv01.afunnysite.com/stolen.flv [R,NC]

when i look in access log, i see
62.131.12.xxx - - [10/May/2008:12:15:38 +0200] "GET /flvideo/11969076081231508051.flv HTTP/1.1" 200 2575501 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14"

no referrer ?

This is issue with Firefox. Flash inside firefox doesn't give away HTTP-REFERER value. Its a bug, all works fine under MSIE.

thanks for this post re the MIME settings. Saved me time.

Adding .flv MIME type in IIS

1) Select the site to configure in IIS, right click and select "Properties"
2) Under HTTP Headers Tab, select "File Types" under the MIME Map section and select "New Type"
3) Type ".flv" as the associated extension and "video/x-flv" as the content type.
4) Select "OK".

Thanks for the MIME settings

It its still not working, remove the .flv setting in your mappings

Post new comment

  • Allowed HTML tags: <code> <blockquote> <em> <strong> <strike> <ul> <li> <ol>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic).

More information about formatting options