Comments

navydoc wrote on 12/4/2006, 3:57 AM
Laurance,

Here's the code to embed a wmv movie. Just change the movie title to yours, adjust the width/height to suit (change both title & size in both places). Change any of the parameters you want such as auto start, then just copy/paste to your web page. Remember, if your movie is in a folder called "media" for example, be sure you show the path for the movie title like this: "media/yourmovie.wmv"

<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab" width="480" height="360">
<param name="FileName" value="yourmovie.wmv">
<param name="AutoStart" value="false">
<param name="ShowTracker" value="true">
<param name="ShowControls" value="true">
<param name="ShowGotoBar" value="false">
<param name="ShowDisplay" value="false">
<param name="ShowStatusBar" value="false">
<param name="AutoSize" value="false">
<param name="PlayCount" value="1"><embed src="yourmovie.wmv" AutoStart="false" ShowTracker="true" ShowControls="true" PlayCount="1" ShowGotoBar="false" ShowDisplay="false" ShowStatusBar="false" AutoSize="false" pluginspage="http://www.microsoft.com/windows/windowsmedia/download/" width="480" height="360"></embed></object>


Scroll down on one of my pages to see some sample embedded videos

Doc

Laurence wrote on 12/4/2006, 5:11 AM
Thanks. It looks like you can embed any file that Media Player can play back. Cool stuff!
Former user wrote on 12/4/2006, 6:40 AM
Keep in mind that you will get the "Click to activate and use this control" issue when using an IE browser (due to Microsoft losing a $600 million dollar lawsuit) if you use an "object" tag. The same thing happens with Flash content embedded this way.

There are ways to circumvent this prompt, but it typically takes a little Java scripting.

Jim
DavidSinger wrote on 12/4/2006, 6:47 AM
Yes, on navydoc's page I get "Done, but with errors on this page" message. The WM Player shows, but no action is possible. On Laurence's example I get the "Download Windows Media Player" (as if I didn't have it on my computer already!) message. I always have to download files to view WMVs because I actually heed Microsoft's encouragement to turn off Active X scripting "for safety reasons." There are some really nasty viruses tucked in WMVs, some which have been snuck onto unsuspecting host sites, including the US gov.

I don't have this problem with QuickTime, and I'm always happier with sites that also offer QT and RT options, plus "Small, Med, and Large" choices.
Jay Gladwell wrote on 12/4/2006, 9:35 AM

Dave, go to my site's "Samples" page and click on any of the Windows Media examples. It will open a page with the media player embedded. Just copy the code and change the file names accordingly.

If you have any problem, let me know via e-mail.


birdcat wrote on 12/4/2006, 10:01 AM
> The same thing happens with Flash content embedded this way

Hi Jim -

I have been using the folllwing to embed SWF files on my pages for a while and I get no prompts:

(Assuming a standard def video)


<object width="720" height="480">
<param name="movie" value="myfile.swf">
<embed src="myfile.swf" width="720" height="480">
</embed>
</object>


Bruce
DavidSinger wrote on 12/4/2006, 10:11 AM
Hey Jay,
Good stuff!
I did get one ActiveX control that tried to play, but as all well-done sites do, the clip kept on playing even when I clicked on "don't allow".
I think I'll look at your code.
David
Former user wrote on 12/4/2006, 12:54 PM
Bruce, thanks for the reply.

Here is a link to a screen grab when I "mouse over" a video on your site: Screen grab

As you can see, I get the "click to activate and use this control" prompt as well as the ghosted frame around the object.

Jim
birdcat wrote on 12/4/2006, 12:58 PM
Hi Jim -

That video is a YouTube hosted video - Try this site: http://bowne.birdcat.com - That shows a SWF file I created using Flix Standard. I used the code snippet above to embed it there.

Bruce
Former user wrote on 12/4/2006, 1:01 PM
Same thing - Screen grab B

Here is a link that discusses the issue and a simple fix -

Simple Fix for prompt

Jim
navydoc wrote on 12/4/2006, 4:19 PM
David,

Yes, on navydoc's page I get "Done, but with errors on this page"

Did you get this message for all my videos? If not, could you let me know which ones seemed to be a problem? This is the first time anyone has reported any problems with my videos. I will look into it.

Thanks,

Doc
Stuart Robinson wrote on 12/4/2006, 7:44 PM
navydoc;

"Done, but with errors on this page" messages are usually JavaScript, not caused by embedded video. It's probably the script from hostingprod.com.

Having said that you should be made aware that your pages don't work (ie there is no video or controls) in Firefox, largely due to the fact that it doesn't understand ActiveX.

...and to make matters even worse, even with an embedded file folks should remember that the player still needs the CODEC, so if you embed a DivX .AVI and people don't have the CODEC, they'll only get the audio.
Laurence wrote on 12/4/2006, 9:05 PM
Thats a good reason to use the DivX playback plugin as well as the codec. It will guide a user through what to do if he doesn't have the right software involved. It also gives a "video in a window" option that looks quite nice. The only thing that bothers me is that the viewer has to install the software that first time. I think that will stop quite a few people.
Laurence wrote on 12/4/2006, 9:05 PM
Thats a good reason to use the DivX playback plugin as well as the codec. It will guide a user through what to do if he doesn't have the right software involved. It also gives a "video in a window" option that looks quite nice. The only thing that bothers me is that the viewer has to install the software that first time. I think that will stop quite a few people. That's why I found the embedded wmv so interesting.
Stuart Robinson wrote on 12/4/2006, 9:21 PM
I think if you're going to embed the Windows Media Player in a page, then the file should be .WMV, otherwise most visitors, unless they're really determined, just won't bother going and getting a CODEC.
Laurence wrote on 12/4/2006, 9:44 PM
One thing I don't like about WMV is that you lose the Mac crowd. While most of the end users I want to reach are probably viewing on a Windows machine, I collaborate mostly with Mac people.
birdcat wrote on 12/5/2006, 5:12 AM
Isn't a SWF file almost always smaller than a WMV file of the same thing?
MH_Stevens wrote on 12/5/2006, 7:55 AM
I have only ever used Flash (.swf files) to embed movies in web pages so I am wondering what is the supposed advantage of Windows Media? I can see that DivX might be more compressed (but no one has the codex) but not Windows Media. What's the logic here of wanting to do this?

DavidSinger wrote on 12/5/2006, 8:35 AM
Doc,
"Yes, on navydoc's page I get 'Done, but with errors on this page'
Did you get this message for all my videos? If not, could you let me know which ones seemed to be a problem? This is the first time anyone has reported any problems with my videos. I will look into it."

Each and every one.

I attribute that to my extreme setting of security (IE 6.0.8.2800)

ActiveX = prompt on download, initialize, script
ActiveX = enable on Run
Java permissions = high safety
Misc Access = prompt
Misc Display = prompt
Installation of desktop items = prompt
Launching Iframe = prompt
Software channel = medium
Userdata persistence = disable
Active scripting = enable
Allow paste = prompt
Scripting Java applets = enable
Override automatic cookie handling
Advanced: Browsing: Disable script debugging
Advanced: Microsoft VM: no Java control, no Java logging, check JIT complier enabled
Advanced: Multimedia: Play [animations, sounds, videos], show pictures, smart image dithering
Advanced: Security: checked only [Use SSL 3.0, Use TLS 1.0, Warn about invalid site certs, Warn if forms redirec]

Everything else is unchecked.

I don't get these problems with QT files anywhere. I only get problems when the files are Microsoft-based. Quite frankly, MS expects an easier passage (with unnecessary "features") into IE than should be the case. Ask any hacker.
Stuart Robinson wrote on 12/5/2006, 12:32 PM
>...so I am wondering what is the supposed advantage of Windows Media? I can see that DivX might be more compressed (but no one has the codex) but not Windows Media. What's the logic here of wanting to do this?<
The advantage is that the vast majority of web users will have the player by default and the player is inherently compatible with most .WMV files. From a compatibility standpoint, it's the next best thing to MPEG-1, which isn't used much due to its technical inferiority.

Windows Media does do a lot of things very well, the files are often smaller than QuickTime, it'll do HD (of course), 50fps and you can set digital rights management.

By-the-way, Windows Media is supported on the MAC, Microsoft no longer develop the player for that platform but there are lots of third-party solutions.

We use Flash Video on our pages now (it's a real pain to work with but the file sizes are small) but still offer straightforward links to .WMV and QT versions. I prefer basic links for both of those, it gives people the option to either click and view or click and download, plus there are no problems with embedding the files and the associated browser/security issues.
Laurence wrote on 12/5/2006, 2:31 PM
I get much better looking results at streamable bitrates using DivX than any variation of WMV. Also, encode times are MUCH shorter. I can play a DivX file directly on my home DVD player as well. DivX can stream really good looking HD. DivX can play back on a PC, a Mac or a Linux system. In every way except for having to install the viewing software and codec the first time, the DivX solution is better.
DavidMcKnight wrote on 12/5/2006, 2:56 PM
...and Beta was better than VHS, but so what?

Forgive the attitude, but depending on the userbase people will expect it to just work, or will never see your video because they'll assume it's trying to d/l a virus if you ask them to install a new codec. Zillions of people already have quicktime / flash / WMP and won't care about quality (ala VHS) so using divx - or anything else - could be an uphill battle.
Stuart Robinson wrote on 12/5/2006, 4:01 PM
As David alludes to, the problem with the web is that everyone else's site is just one click away. If someone comes to my site to view my video, I don't want them to have to go to the DviX site first, download a player and/or CODEC and then come back. They'll either get fed up or sidetracked viewing the clips on the DivX site.

You've got to remember that most of us here are advanced users, whereas most web users are complete ignorant when it comes to the likes of video CODECs and players.

I like DivX, but just to address some of your points:

>I get much better looking results at streamable bitrates using DivX than any variation of WMV.<

I find that's debatable. It depends on the clip and the type of footage. The current version of DivX will not encode 50fps material (at least I can't find a way) but the Windows Media Encoder has no problems.

>Also, encode times are MUCH shorter.<

That's only true if you use the fastest encode setting, which results in the worst quality files. If you use multipass encoding at the "insane" quality level, DivX will always be slower than Windows Media (and I'm basing this on the x64 WM encoder).

>I can play a DivX file directly on my home DVD player as well.<

That's a good point, but I wonder how many people are going to go to the trouble of copying a web video to DVD etc. Conversely many media players can handle WMV (I'm thinking of devices such as the HD Mediabox) but aren't DivX compatible.

>DivX can play back on a PC, a Mac or a Linux system.<

So can WMV, except on a PC you don't have to download anything. On a Mac or Linux you can play WMV files by downloading compatible software, as is always the case with DivX regardless of platform.

>In every way except for having to install the viewing software and codec the first time, the DivX solution is better.<

Your mileage may vary, but in my experience while DivX has some plus points, they're certainly not across the board and it's not a format that's suitable for general website use.
tazio wrote on 12/5/2006, 4:10 PM
"We use Flash Video on our pages now (it's a real pain to work with but the file sizes are small) but still offer straightforward links to .WMV and QT versions. I prefer basic links for both of those, it gives people the option to either click and view or click and download, plus there are no problems with embedding the files and the associated browser/security issues"

I'm currently grappling with these kind of issues of embedding and streaming formats. Why do you think Flash is a pain to work with? We've been using wmv quite successfully with linked videos but embedding can get hairy, and we've been adked to provide swf?

Also we stream wmv at 133 kBps because of Australia's slow broadband speeds, but when we do 300k swfs, they stream (prog download) fine and look heaps better?

It was all so simple when it was just wmv, but flash seems to be looking better and better