views:

2572

answers:

3

Hello everyone,

I have tried to play wmv/asf file in html page, but always Windows Media Player is embedded in browser, but Flash Media Player is not embedded. Here is my code to embed Flash Media Player. I suspect it is because Flash Media player does not support wmv/asf format, so even if I explicitly assign "application/x-shockwave-flash" value, Flash Media player is not displayed. Any ideas? Does Flash Media player support wmv/asf file?

<html>
<body>
<embed src="http://myserver/videos/123.asf" quality="high" width="480" height="400" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash"></embed>
</body>
</html>

thanks in advance, George

+1  A: 

It's not so much that Flash doesn't support wmv/asf; it's more the fact that wmv/asf is not a Flash movie, so you can't pretend that it's one by putting it in the src attribute when you're using the application/x-shockwave-flash type. Try putting a media player Flash movie instead.

Ignacio Vazquez-Abrams
Thanks Ignacio, flash media is fine. I am just wondering 1. whether flash media player supports playing asf/wmv file format media? 2. if not supported, why I could upload wmv media to Youtube and then play it in Youtube using Flash Media Player?
George2
Youtube lets you upload the video in a select range of formats, then converts it to .flv on the server side.
Ignacio Vazquez-Abrams
"then converts it to .flv on the server side" -- interested. Do you have any documents about this? I am interested to read more.
George2
Nothing on what Youtube does specifically, but mplayer (http://www.mplayerhq.hu/) will convert between different video formats.
Ignacio Vazquez-Abrams
http://www.ffmpeg.org is often used server side to convert videos
Theo.T
Thanks, are there any claims that youtube is using mplayer? Not find any documents or blogs mentioning that. Any ideas?
George2
+1  A: 
  1. There's an obvious confusion here : Flash Player is not directly a media player. The source specified in the embed should be a SWF. On the other hand there are media players built in flash (e.g. JW FLV Media Player).

  2. Flash doesn't accept WMV but uses FLV / MPEG-4.

  3. The streaming protocol used is RTMP, not sure how to handle an ASF stream in flash.

Theo.T
Thanks Theo.T, flash player I mean the playe we use to play Youtube video. 1. why you mention ASF stream? Do you mean asf/wmv is using ASF stream which Flash player can not support? 2. do you have any documents claim flash player does not support wmv format?
George2
1. Sorry I thought that was what you had, not sure what I got that from. 2. Have a look here for the supported formats : http://en.wikipedia.org/wiki/Flash_Video
Theo.T
Thanks Theo.T, 1. I need to play asf because all present videos are of this format, so flash media player does not support it? 2. I looked through the link, seems wmv/asf file format are not listed, so not supported by Flash Media Player?
George2
Sorry for confusing term "Flash Media Player", actually what I mean is "About Adobe Flash Player 10" -- which is shown when we right click on a Youtube video. So, for the sample of Youtube, the "About Adobe Flash Player 10" plays flv or plays swf?
George2
NO, Flash doesn't accept WMV ...
Theo.T
Flash Player 10 reads SWFs. "Flash Media Player" is a SWF. "Flash Media Player" reads FLVs.
Theo.T
You should browse around Wikipedia and Google if your new to this, there's an incredible amount of information about the subject. Good luck ; )
Theo.T
Thanks Theo.T, so Youtube converts all videos into flv format and using "a popular SWF" Flash Media Player to render it? Correct?
George2
1. Looks like Flash Player also does not support Microsoft ASF format? I did not find ASF in the supported list. Correct? 2. In my sample, I think IE automatically finds ASF is rendered, so Microsoft Windows Media Player is using? IE is so smart to switch player, any comments?
George2
(continue) even if we explicitly assign type as "application/x-shockwave-flash", IE will smartly do the player switch. Not sure whether it is IE or something else so smart! :-)
George2
1. Correct 2. Indeed, in IE as well as in your operating system MIME formats are associated with applications to read them.
Theo.T
Should we consider this question finished ? I need to get some break fast now :)
Theo.T
Please feel free to take your time, Theo. :-) I just have the last question, do you have any links about how Youtube is doing to convert media format (e.g. convert all media format to flv format and using mplayer)?
George2
haha, thanks for that : ) I bet youtube has a complex internal procedure for that, don't think this is public. FFMPEG is a great software you can use both server and client side to convert various formats to FLV. http://www.google.com/search?q=ffmpeg+convert+to+flv
Theo.T
I know FFMPEG. I am just interested how Youtube is dealing with various input format. Are they using FFMPEG to do format conversion? I searched but can not find any documents online or blogs. Do you have any such information? I am very interested.
George2
http://video.google.com/videoplay?docid=-6304964351441328559
Theo.T
Hi Theo.T, I browsed it for half an hour, can not find it answers my question. But anyway, your replies are good enough. Looks like youtube is not open their encoding process.
George2
Yes, answered, I have marked it. :-)
George2
A: 

Hi i just try ur idea(change shockwave-flash type to media player its works fine in windows midea player 10. but not in version 9 any idea?

packiaraj