How do I embed a video onto a webpage?

fetch wrote on 11/29/2002, 5:11 AM
I know how to prepare a video for streamimg but I want to know how do I embed it into my webpage so a person can click on a play button and it will play from my webpage not bring up the download prompt or open Windows media player and then play.

Similar to this (but on a very basic scale): http://www.xtramsn.co.nz/musicandvideo/0,,5203,00.html

Can someone point me to a really good tutorial, I understand that some scripting language is required.

Thanks,
Fetch

Comments

swarrine wrote on 11/29/2002, 8:20 AM
Go to wallacemv.com/sample1.htm and look at the coding. (View>Source.
fetch wrote on 11/29/2002, 9:33 AM
Ok, I've done a sample here which I hope to get your feedback on.

Here's the link:
http://members.optushome.com.au/fetchthis/video.htm

This has been mainly optimized for those on cable connection, the file is about 9mb encoded to wmv and about 4min long, created using VV3.

Let me know what you think about the embedding process as I'm new to webpage creation so I want to know what are the best settings for video streaming.
Was this video slow to load?
Was the quality acceptable?
Was playback continuous?
Was buffering time acceptable? etc...

Thanks heaps.

Fetch


Paul_Holmes wrote on 11/29/2002, 11:53 AM
Try this link for a basic template for various media:

Embedded Media HTML Generator

Also, here's an example on my new Family web site (completely under construction!). You can right click on the Media player frame to view source:

Holmes Family Connection
decrink wrote on 11/29/2002, 12:14 PM
Everything worked fine, downloaded and played well. I'm curious as to how you did this because when I embed files they always open a separate Windows Media Player. How did you embed the player? I looked at the code but could not reproduce your embedded player that would run another video. I can get the player graphics but cannot get it to play my own video. Do you have to have some sort of player in your source folder with the video?

Everything on your end looks good.
Paul_Holmes wrote on 11/29/2002, 12:24 PM
It could be you're not directing the file parameter to the right place. Try placing the file in the same directory as the web page, then simply type in the media file name (has to be an asf or wmv for Windows Media) as the file parameter. Also, further down you want to replace the embed SRC parameter (embed is for netscape browsers) with the same file name so it plays in Netscape. If this works then it's just a matter of telling these parameters exactly where your file is. If it's in a higher directory then you might have to reference it like "..\The Higher Directory\The Media File."

Also, you can play with the size of the player by setting the width and height at the very beginning of the object tag and the same down in the embed tag at the bottom.
kkolbo wrote on 11/29/2002, 12:34 PM
Great link to the generator. I am too lazy to call the code fragment up from my own disc!
fetch wrote on 11/29/2002, 4:04 PM
Decrink, here's a great tutorial that I used as a reference:
http://nickyguides.digital-digest.com/stream.htm

Like paul said make sure the file parameter is in the right place, in my case mine was in <param name="Filename" value="stream/lipsynchwmv.wmv">
which meant my source video was in another folder called 'stream'

NB:Ignore the parameter used in the tutorial, I couldn't get it to work ie:
<param name="Filename" value="Http://www.webhost.com/folder(if one)/filename.wmv">

Also make sure you have the following which is also in my code:
<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" height="259" id="Player" width="292" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715">

This is to tell your webpage you have a streaming media clip to embed inside your page. You can adjust the height and width to your liking.
The code base="http://..." enables a user to download the activex control which is reqquired to view the video.

All the parameters you see in my code tell it how I want the video played, displayed, auto rewind when finished etc..
But if you just copy my code you can't go wrong.

Goodluck, and thanks for your feedback.