How To Embed a .avi or .mpeg file on a web page?

  • CGFX
  • Graduate
  • Graduate
  • User avatar
  • Posts: 161
  • Loc: Chicago, IL.

Post 3+ Months Ago

I once had the HTML script to embed a .avi movie file on a web page the same as we do jpg & gif files. No it didn't open up a Media player and I don't want it to, it simply played right in the table and/or frame you put it in. Do anybody know that script, I lost it. :roll:

Thanks
cgfX
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Nunzio390
  • Student
  • Student
  • User avatar
  • Posts: 70
  • Loc: Tharsis Ridge (Martian lowlands)

Post 3+ Months Ago

Are you looking for something similar to what I do at this page at my site? If so, I'll post some code for you.
  • Nunzio390
  • Student
  • Student
  • User avatar
  • Posts: 70
  • Loc: Tharsis Ridge (Martian lowlands)

Post 3+ Months Ago

CGFX....

Although you haven't responded yet, you may also want to refer to the code I posted in this thread for emac. It is a variation on the same Windows Media Player object and embed controls (for cross-browser compatability), to allow the video to play and work perfectly within all major browsers (eg: MSIE, Netscape/Mozilla, and Opera browsers)

The only difference there is that I had a new "pop-up" window (containing the video) sized to the video file itself opening on its own, instead of with a "select" menu with the video embedded right into the page (as was done at the Wacky Videos page at my site).

You can code it either way. If you need any help with the code to work specifically with your site, post back here and let me know. I had temp-uploaded a working example for emac specific to his site, but the working example was removed from my site earlier today after I received a PM from emac asking me to remove it, now that his problem was solved.
  • CGFX
  • Graduate
  • Graduate
  • User avatar
  • Posts: 161
  • Loc: Chicago, IL.

Post 3+ Months Ago

Nunzio,

Thank you for your effort to help me out. I went to both of your links, and those where not what I am talking about. Your graphic that you use in here looks like a .avi or mpeg. But I am sure it is a gif file. If I find what I am look for, I will drop you a note.
Thanks
cgfX
  • Nunzio390
  • Student
  • Student
  • User avatar
  • Posts: 70
  • Loc: Tharsis Ridge (Martian lowlands)

Post 3+ Months Ago

:shock: ???

I'm confused. Not what you are looking for? I think it is.
This is what you originally posted...

CGFX wrote:
I once had the HTML script to embed a .avi movie file on a web page the same as we do jpg & gif files. No it didn't open up a Media player and I don't want it to, it simply played right in the table and/or frame you put it in. Do anybody know that script, I lost it. :roll:


According to what you originally asked, you are looking for a movie to play right within (embedded in) a web page (table - frame - doesn't matter), without the person's media player of choice installed in Windows opening instead to play the movie. Right? That's the way I read your initial post and that is what my response was based on.

I think you misread/misunderstood the references I posted.

Let's isolate just one movie that is part of the selection list at my Wacky Videos page....

http://nunzioweb.com/misc/wacky/rescue_baby.htm

When you click on the above link, a web page opens with the movie embedded right within that page, and the movie begins playing. Unless I'm completely misunderstanding you, that is exactly what you want to do.

So, in case that is what you want (and I'm pretty certain it is), then here is the cross-browser object and embed controls (for cross-browser compatability) used on that page, to allow the video to play and work perfectly within a web page in all major browsers...
Code wrote:
<object id="MediaPlayer1" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
standby="Loading Microsoft Windows® Media Player components..." type="application/x-oleobject" width="280" height="256">
<param name="fileName" value="
Kick_Baby_2.mpg">
<param name="animationatStart" value="true">
<param name="transparentatStart" value="true">
<param name="autoStart" value="true">
<param name="showControls" value="true">
<param name="Volume" value="-450">
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="
Kick_Baby_2.mpg" name="MediaPlayer1" width=280 height=256 autostart=1 showcontrols=1 volume=-450>
</object>


Just change both instances indicated in red in the above code to point to your .avi movie file instead of mine. That's all.

If you prefer to not have the player controls showing (visible), then change these lines...
Code wrote:
<param name="showControls" value="true">
showcontrols=1


to this instead...
Code wrote:
<param name="showControls" value="false">
showcontrols=0


If you do that though, you may also have to change the 2 instances of the height value of the movie to compensate for the missing controls, to not show any "black" space where the controls should have been.

Example:
Change the 2 height values of 256 to 212 or so. That should embed the movie nicely cross-browser, since the player controls are approximately 44 pixels high.

*Note: width and height values will need to be changed to reflect the size of the actual movie, since different movies have different dimensions. Your movie may be larger/smaller than mine.
  • CGFX
  • Graduate
  • Graduate
  • User avatar
  • Posts: 161
  • Loc: Chicago, IL.

Post 3+ Months Ago

Excellnt, you are correct. Thanks, I guess I did misunderstand.
High 5
cgfX



























i
  • Kengyu
  • Born
  • Born
  • User avatar
  • Posts: 1

Post 3+ Months Ago

Nunzio390, I saw your wacky videos page and that is exactly what I am attempting for my own page. After much frustration I have decided to start from scratch. Can you help me out. :roll:
  • CGFX
  • Graduate
  • Graduate
  • User avatar
  • Posts: 161
  • Loc: Chicago, IL.

Post 3+ Months Ago

Nunzio,

I found my old school notes with the very code I was looking for. I am going to try yours one day on another project. Your code may work real well or better with another design. But for my business "Animations" page. I wanted it just as it is shown, you are welcome to take a peep at: http://www.clevergraphfix.com/pageOne.htm

Thanks Again,
cgfX
  • floridave
  • Born
  • Born
  • floridave
  • Posts: 1

Post 3+ Months Ago

I have been doing some testing with embedded movies and have ran into a issue where the embedded player does not respect the letter box / wide screen ratio.

Here is a example of embedded movie incorrect aspect ratio:
http://langleycom.com/g1/movie/Widescreen1
however the correct ratio when not played embedded bit in the popup media-player it plays correctly.
http://langleycom.com/g1/albums/movie/Widescreen1.wmv

I have the <param name="AutoSize" value="1"> and it seems to work correctly except for the wide screen movies.

Any pointers or is this just another media player issue.

Cheers,
Dave

EDIT:
I have been able to fix this by using getID3 to give the movie the correct height and width.
  • musik
  • Legend
  • Super Moderator
  • User avatar
  • Posts: 6893
  • Loc: up a tree

Post 3+ Months Ago

CGFX wrote:
I once had the HTML script to embed a .avi movie file on a web page the same as we do jpg & gif files. No it didn't open up a Media player and I don't want it to, it simply played right in the table and/or frame you put it in. Do anybody know that script, I lost it. :roll:

Thanks
cgfX



I'm not sure the actual code, but I know Adobe GoLive you can drop the file straight into the page and it embeds it and plays it like you described.
  • OriginNO
  • Graduate
  • Graduate
  • User avatar
  • Posts: 137
  • Loc: the Glass City (Hometown: the NO)

Post 3+ Months Ago

Here is the code you all want. I used it to show music videos when I was the webmaster for CRUNK Magazine. It will play .avi, .mpeg, .mov, .swf, and all sound file types except for .rm.



Code: [ Select ]
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="195" width="340" name="CRUNKCinema" align="left">
     <param name="src" value="movietrailers/trailer_sma.mov">
     <param name="autoplay" value="true">
     <param name="controller" value="true">
     <embed height="195" width="340" align="left" src="movietrailers/trailer_sma.mov" autoplay="true" controller="true">
     </embed>
    </object>
  1. <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="195" width="340" name="CRUNKCinema" align="left">
  2.      <param name="src" value="movietrailers/trailer_sma.mov">
  3.      <param name="autoplay" value="true">
  4.      <param name="controller" value="true">
  5.      <embed height="195" width="340" align="left" src="movietrailers/trailer_sma.mov" autoplay="true" controller="true">
  6.      </embed>
  7.     </object>


Enjoy :)
  • musik
  • Legend
  • Super Moderator
  • User avatar
  • Posts: 6893
  • Loc: up a tree

Post 3+ Months Ago

well done mate :thumbsup:
  • bluedragon
  • Proficient
  • Proficient
  • bluedragon
  • Posts: 452

Post 3+ Months Ago

Yeah how do you make it repeat itself? The following is what i am using.

Code: [ Select ]
<object id="MediaPlayer1" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
standby="Loading Microsoft Windows® Media Player components..." type="application/x-oleobject" width="280" height="40">
<param name="fileName" value="http://www.legacy-rpg.com/media/d12_(d12_world)_09-how-come.mp3">
<param name="animationatStart" value="true">
<param name="transparentatStart" value="true">
<param name="autoStart" value="true">
<param name="showControls" value="true">
<param name="Volume" value="-450">
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="http://www.legacy-rpg.com/media/d12_(d12_world)_09-how-come.mp3" name="MediaPlayer1" width=280 height=256 autostart=1 showcontrols=1 volume=-450>
</object>
  1. <object id="MediaPlayer1" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
  2. standby="Loading Microsoft Windows® Media Player components..." type="application/x-oleobject" width="280" height="40">
  3. <param name="fileName" value="http://www.legacy-rpg.com/media/d12_(d12_world)_09-how-come.mp3">
  4. <param name="animationatStart" value="true">
  5. <param name="transparentatStart" value="true">
  6. <param name="autoStart" value="true">
  7. <param name="showControls" value="true">
  8. <param name="Volume" value="-450">
  9. <embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="http://www.legacy-rpg.com/media/d12_(d12_world)_09-how-come.mp3" name="MediaPlayer1" width=280 height=256 autostart=1 showcontrols=1 volume=-450>
  10. </object>
  • UserCookie69
  • Born
  • Born
  • UserCookie69
  • Posts: 1
  • Loc: PA

Post 3+ Months Ago

hey CGFX i saw ur site waht is the code u use?
  • jeannepo
  • Student
  • Student
  • jeannepo
  • Posts: 72
  • Loc: Denver

Post 3+ Months Ago

Great thread! but, I've got a reeeeeeeally dumb question. :oops:

How can I embed a 7.5mb .mov file into my html and have it load as quickly as the video's you all have in these web pages? Seems like my .mov, even with my DSL, takes forever to load and play in Quicktime. Should I be looking into streaming video?

Any thoughts would be greatly appreciated! :)
  • 50ar
  • Born
  • Born
  • 50ar
  • Posts: 1

Post 3+ Months Ago

This is cool.

I have hired a company to do a web page for me and told them up front that I wanted to be able to post mpegs on it. I really like what Nunzio390 has for viewing movies on his site!

I will refer my web-site-maker to his site to show just what I want.

Anyone have any advice on keeping track of how it is done?

Nunzio390's viewer seems very solid.

Thanks.

50ar
  • JimmyJimmy
  • Born
  • Born
  • JimmyJimmy
  • Posts: 1

Post 3+ Months Ago

Hi all.
I am new to the forum, so forgive if this has been covered
I have read through this thread, and still haven't had any luck.
I want to embed an mpeg movie in the browser...
Everything shows up except the movie. I had to install a dvd program just to WATCH the movies. Is this what is causing the browser not to play the mpeg?
Thank you so much for your time!
  • hiteckart
  • Novice
  • Novice
  • hiteckart
  • Posts: 25

Post 3+ Months Ago

Nunzio390 wrote:
:shock: ???

I'm confused. Not what you are looking for? I think it is.
This is what you originally posted...

CGFX wrote:
I once had the HTML script to embed a .avi movie file on a web page the same as we do jpg & gif files. No it didn't open up a Media player and I don't want it to, it simply played right in the table and/or frame you put it in. Do anybody know that script, I lost it. :roll:


According to what you originally asked, you are looking for a movie to play right within (embedded in) a web page (table - frame - doesn't matter), without the person's media player of choice installed in Windows opening instead to play the movie. Right? That's the way I read your initial post and that is what my response was based on.

I think you misread/misunderstood the references I posted.

Let's isolate just one movie that is part of the selection list at my Wacky Videos page....

http://nunzioweb.com/misc/wacky/rescue_baby.htm

When you click on the above link, a web page opens with the movie embedded right within that page, and the movie begins playing. Unless I'm completely misunderstanding you, that is exactly what you want to do.

So, in case that is what you want (and I'm pretty certain it is), then here is the cross-browser object and embed controls (for cross-browser compatability) used on that page, to allow the video to play and work perfectly within a web page in all major browsers...
Code wrote:
<object id="MediaPlayer1" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
standby="Loading Microsoft Windows® Media Player components..." type="application/x-oleobject" width="280" height="256">
<param name="fileName" value="
Kick_Baby_2.mpg">
<param name="animationatStart" value="true">
<param name="transparentatStart" value="true">
<param name="autoStart" value="true">
<param name="showControls" value="true">
<param name="Volume" value="-450">
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="
Kick_Baby_2.mpg" name="MediaPlayer1" width=280 height=256 autostart=1 showcontrols=1 volume=-450>
</object>


Just change both instances indicated in red in the above code to point to your .avi movie file instead of mine. That's all.

If you prefer to not have the player controls showing (visible), then change these lines...
Code wrote:
<param name="showControls" value="true">
showcontrols=1


to this instead...
Code wrote:
<param name="showControls" value="false">
showcontrols=0


If you do that though, you may also have to change the 2 instances of the height value of the movie to compensate for the missing controls, to not show any "black" space where the controls should have been.

Example:
Change the 2 height values of 256 to 212 or so. That should embed the movie nicely cross-browser, since the player controls are approximately 44 pixels high.

*Note: width and height values will need to be changed to reflect the size of the actual movie, since different movies have different dimensions. Your movie may be larger/smaller than mine.



THANK YOU!
  • joe_liew
  • Born
  • Born
  • joe_liew
  • Posts: 2

Post 3+ Months Ago

Hello to everybody, i'm new here. lately i've been trying to embed WMV file into a web page. i've copied and tried all the codes posted in this forum. The media player loads. However the movie cannot play. Nothing appears at all except for the player itself. Can anyone advice me?

Below is a link to the site,

http://www.jiwabaru.com/test.htm

i have uploaded the STour.wmv file into web server under Video folder.
Any idea why it couldn't load the file?
The WMV file is only 700+kb.

Please email me at joe_liew@jiwabaru.com. Thanks.
  • meman
  • Web Master
  • Web Master
  • User avatar
  • Posts: 3432
  • Loc: London Town , Apples and pears and all that crap

Post 3+ Months Ago

I doubt people will email you the answer, if you cant be bothered to come back people wont make the effort running after you.

I would guess either the movie needs more time to load (test it on your computer).
Or the code is looking in the wrong location for the movie file, double check that you put the correct path in.
  • joe_liew
  • Born
  • Born
  • joe_liew
  • Posts: 2

Post 3+ Months Ago

Hi Meman,

Thanks for your advice. I do come back to the forum to check out if there is any reply. Anyway i've checked the path and it is correct. The file loads perfectly in local computer. Is there anything got to do with the web server whether it supports mpeg or wmv file?
  • hiteckart
  • Novice
  • Novice
  • hiteckart
  • Posts: 25

Post 3+ Months Ago

Code: [ Select ]
<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="160"HEIGHT="16"
CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">
<PARAM name="SRC" VALUE="your.wmv" >
<PARAM name="AUTOPLAY" VALUE="true">
<PARAM name="CONTROLLER" VALUE="true">
<EMBED SRC="your.wmv" WIDTH="160" HEIGHT="144" AUTOPLAY="true" CONTROLLER="false" PLUGINSPAGE="http://www.apple.com/quicktime/download/">
</EMBED>
</OBJECT>
  1. <OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="160"HEIGHT="16"
  2. CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">
  3. <PARAM name="SRC" VALUE="your.wmv" >
  4. <PARAM name="AUTOPLAY" VALUE="true">
  5. <PARAM name="CONTROLLER" VALUE="true">
  6. <EMBED SRC="your.wmv" WIDTH="160" HEIGHT="144" AUTOPLAY="true" CONTROLLER="false" PLUGINSPAGE="http://www.apple.com/quicktime/download/">
  7. </EMBED>
  8. </OBJECT>


For wmv files I like to use the Quicktime plugin, it looks better.
  • Dubya
  • Proficient
  • Proficient
  • User avatar
  • Posts: 468

Post 3+ Months Ago

joe_liew, I think what meman was trying to say was if it loads fine on your local computer, then it is probably just a very large file that will take time to load once it's up on the server. If you could, post you internet connection type (eg. cable or dialup) and the size of the video you are trying to embed. Then we can confirm if this is in fact the case.
  • rtrev64
  • Beginner
  • Beginner
  • rtrev64
  • Posts: 38

Post 3+ Months Ago

CGFX wrote:
I once had the HTML script to embed a .avi movie file on a web page the same as we do jpg & gif files. No it didn't open up a Media player and I don't want it to, it simply played right in the table and/or frame you put it in. Do anybody know that script, I lost it. :roll:

Thanks
cgfX


Well I don't know if this is what you are looking for. It was a wmv but I changed it to flash.. check it out..
http://www.roberttrevino.com/rockonmusic.html
  • rtrev64
  • Beginner
  • Beginner
  • rtrev64
  • Posts: 38

Post 3+ Months Ago

[flash width=100 height=100 loop=false]http://www.roberttrevino.com/guitar2ca.swf[/flash]

http://www.roberttrevino.com/rockonmusic.html
  • Chief Geek
  • Born
  • Born
  • Chief Geek
  • Posts: 1

Post 3+ Months Ago

Thanx for your answer numzio, it has helped me tremendously!
  • rtrev64
  • Beginner
  • Beginner
  • rtrev64
  • Posts: 38

Post 3+ Months Ago

I scrolled up see if there was a numzio and did not see that.. what is a numzio?

If you were calling me stupid then sorry for even replying.
  • deaconblues86
  • Born
  • Born
  • deaconblues86
  • Posts: 1

Post 3+ Months Ago

I'm having problems with embedding a .wmv into a page for Opera. The code works fine when I open the page directly with Opera, but when I click a link to the page from another, Opera goes to the new page with the video for a split second and then goes back to the previous page. I simply cannot figure it out.

Here is the code, the umpteenth revision based on other posts here:

Code: [ Select ]
<p class="media">
<object id="MediaPlayer1" width=180 height=200
classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
standby="Loading Microsoft® Windows® Media Player components..."
type="application/x-oleobject" align="middle">
<param name="FileName" value="//server/AUCTIONS/2005/20050428/1004.wmv">
<param name="ShowStatusBar" value="True">
<param name="DefaultFrame" value="mainFrame">
<embed type="application/x-mplayer2"
pluginspage = "http://www.microsoft.com/Windows/MediaPlayer/"
src="//server/AUCTIONS/2005/20050428/1004.wmv" align="middle"
width=176
height=144
defaultframe="rightFrame"
showstatusbar=true>
</embed>
</object>
</p>
  1. <p class="media">
  2. <object id="MediaPlayer1" width=180 height=200
  3. classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
  4. codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
  5. standby="Loading Microsoft® Windows® Media Player components..."
  6. type="application/x-oleobject" align="middle">
  7. <param name="FileName" value="//server/AUCTIONS/2005/20050428/1004.wmv">
  8. <param name="ShowStatusBar" value="True">
  9. <param name="DefaultFrame" value="mainFrame">
  10. <embed type="application/x-mplayer2"
  11. pluginspage = "http://www.microsoft.com/Windows/MediaPlayer/"
  12. src="//server/AUCTIONS/2005/20050428/1004.wmv" align="middle"
  13. width=176
  14. height=144
  15. defaultframe="rightFrame"
  16. showstatusbar=true>
  17. </embed>
  18. </object>
  19. </p>


It works great if opened directly, but, for the projection presentation for we're using this, that isn't an option. I've removed the code and the page functions properly, so I'm pretty sure the problem is here. Any help would be appreciated.
  • johnson8169z
  • Banned
  • Banned
  • johnson8169z
  • Posts: 22
  • Loc: *TOP SECRET* (Not So)

Post 3+ Months Ago

hey nunzio!! mind if u show me how u do that slidin' nav on your site? thx
  • johnson8169z
  • Banned
  • Banned
  • johnson8169z
  • Posts: 22
  • Loc: *TOP SECRET* (Not So)

Post 3+ Months Ago

johnson8169z wrote:
hey nunzio!! mind if u show me how u do that slidin' nav on your site? thx


about it, can u pm me or something?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 49 posts
  • Users browsing this forum: No registered users and 34 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.