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

  • Jordan514d
  • Novice
  • Novice
  • User avatar
  • Posts: 33

Post 3+ Months Ago

I would also be very interested to know how you did the sliding bar thing


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

Post 3+ Months Ago

  • TechnoPurr
  • Born
  • Born
  • TechnoPurr
  • Posts: 1
  • Loc: Beaver Falls, PA

Post 3+ Months Ago

I understand most the code and how it works...but i tried almost every one of those codes in order to embed an .mpeg file from wmplayer onto my page and it shows up as a broken link (the quicktime symbol ripped in two) i dont know what im doing wrong!

this is what my code looks like:

<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="C:\Documents and Settings\Linda Moore\Desktop\Programs\Ares\AtomX - Final Fantasy VIII - Enigma (Gravity of Love).mpeg" value="AtomX - Final Fantasy VIII - Enigma (Gravity of Love).mpeg">
<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="AtomX - Final Fantasy VIII - Enigma (Gravity of Love).mpeg" name="MediaPlayer1" width=280 height=256 autostart=1 showcontrols=1 volume=-450>
</object>


what is making it not work?
  • CGFX
  • Graduate
  • Graduate
  • User avatar
  • Posts: 161
  • Loc: Chicago, IL.

Post 3+ Months Ago

TechnoPurr,

I am sorry, I am just now seeing this post. When I get home, I will find the correct script that you need.

cgFX
  • cold_fish_soup
  • Born
  • Born
  • cold_fish_soup
  • Posts: 2

Post 3+ Months Ago

Hi,

this is a pretty helpful thread :). Just another question: How can I hide the real filename of the embedded clip? At the moment you easily get it by clicking right and looking at the properties. I want to prevent direct downloads.

Thanks in advance for your help.
  • cold_fish_soup
  • Born
  • Born
  • cold_fish_soup
  • Posts: 2

Post 3+ Months Ago

Ok, I did it via PHP. The Problem is, it works with IE but not with Firefox or Opera.

This is the HTML-code:
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="360"
 height="320">

 <param name="filename" value="mediadownload.php">
 <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="mediadownload.php"
  name="MediaPlayer"
  width=360
  height=320
  autostart=1
  showcontrols=1
  volume=-450>
 </embed>
</object>
  1. <object id="MediaPlayer1"
  2.  CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
  3.  codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
  4.  standby="Loading Microsoft Windows® Media Player components..."
  5.  type="application/x-oleobject"
  6.  width="360"
  7.  height="320">
  8.  <param name="filename" value="mediadownload.php">
  9.  <param name="animationatstart" value="true">
  10.  <param name="transparentatstart" value="true">
  11.  <param name="autostart" value="true">
  12.  <param name="showcontrols" value="true">
  13.  <param name="volume" value="-450">
  14.  <embed type="application/x-mplayer2"
  15.   pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
  16.   src="mediadownload.php"
  17.   name="MediaPlayer"
  18.   width=360
  19.   height=320
  20.   autostart=1
  21.   showcontrols=1
  22.   volume=-450>
  23.  </embed>
  24. </object>


This is the download script:
Code: [ Select ]
<?php

 session_start();

 if (trim($_SESSION['media_file']) != '') {
  $CompleteFilename = $_SESSION['media_file'];
 
  header('Content-Type: application/octet-stream');
  header('Content-Disposition: attachment; filename="'.$_SESSION['media_file'].'"');
 
  readfile($CompleteFilename);
 }

?>
  1. <?php
  2.  session_start();
  3.  if (trim($_SESSION['media_file']) != '') {
  4.   $CompleteFilename = $_SESSION['media_file'];
  5.  
  6.   header('Content-Type: application/octet-stream');
  7.   header('Content-Disposition: attachment; filename="'.$_SESSION['media_file'].'"');
  8.  
  9.   readfile($CompleteFilename);
  10.  }
  11. ?>


I'm not sure, wether the Problem is the HTML-Code, because if the filename given is the absolut path to the video and not the download script, then in works with all browsers.

Any idea, what could be wrong?
  • horizon180
  • Born
  • Born
  • horizon180
  • Posts: 1
  • Loc: tokyo, japan

Post 3+ Months Ago

this thread is very helpful. thank you everyone...

i have a quick querry...

i've been trying the embedding codes presented here, but i just can't seem to get the embedded player to show the controls....even with the showcontrols set to true or 1 respectively... neither does the autostart parameter seem to be working, doesn't matter if i set it to 1 or 0, the video always autostarts...

here's my code that i'm using and my file is xvid 640x360... i've even added an extra 44 to make sure the controller has enough space:

Quote:
<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="640" HEIGHT="425"
CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab" border="1">
<PARAM name="SRC" VALUE="videos/abc.avi" >
<PARAM name="AUTOPLAY" VALUE="false">
<PARAM name="CONTROLLER" VALUE="true">
<EMBED SRC="videos/abc.avi" WIDTH="640" HEIGHT="425" AUTOPLAY="false" CONTROLLER="true" PLUGINSPAGE="http://www.apple.com/quicktime/download/" CACHE="true">
</EMBED>
</OBJECT>


what am i doing wrong? does the html file extension need to be changed to something else? the controls show up when i use IE (usually i'm using firefox) but the autoplay still doesn't work... i mean its still autoplaying even when i tell it not to.

thnx ^^
  • kristine1991
  • Born
  • Born
  • kristine1991
  • Posts: 3

Post 3+ Months Ago

Nunzio390 wrote:
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.


Nunzio, This is exactly what I am looking for. Not only do I want the embedded player... I also want the iframe that has the selections available. I would greatly appreciate you sharing that code also.

Many thanks,
Kristine
  • christuvell
  • Born
  • Born
  • christuvell
  • Posts: 1

Post 3+ Months Ago

I like the code that was posted in order to play an mpg on a web page. I copied and pasted the code (code I changed below) and changed the names as suggested. When I open the page nothing happens. I've put the mpg in my root directory.

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>

<body>
<object id="MediaPlayer1" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsm p2inf.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="[/color:8891f1872d]movie01.mpg[color=orange:8891f1872d]">
<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="[/color:8891f1872d]movie01.mpg[color=orange:8891f1872d]" name="MediaPlayer1" width=280 height=256 autostart=1 showcontrols=1 volume=-450>
</object>

</body>

</html>

I can't figure out why it won't play. Any help would be greatly appreciated.

Here's the URL I'm trying to open the mpg from.

http://www.ushaji.org

Thanks,

Chris
  • metoo
  • Newbie
  • Newbie
  • User avatar
  • Posts: 10
  • Loc: Los Angeles

Post 3+ Months Ago

Nunzio390 wrote:
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.


If you're still alive and active, I'd like to replace what is now at http://www.blog.myspace.com/dk_mason with EXACTLY what you use on wacky videos. A few cosmetic changes will be developed but YES your script seems perfect. I hope there is no <script> </script> involved because myspace does not seem to allow it.
  • DOS989
  • Born
  • Born
  • User avatar
  • Posts: 1
  • Loc: SC

Post 3+ Months Ago

Pardon me for temporarily skipping the introduction, I just wanted to get this one in before I go (Of course I'll check back later, but work is calling me now). I tried the code given here (for the windows media player style viewer) but it doesn't seem to be handling my file correctly. The long story made short - I converted a 3GP to mpg and uploaded it (see http://fire.prohosting.com/dos/gallery.html , it's still very basic because of time restraints, I work on different parts of the site when I get time). Instead of playing inside the little media player window, it wants to download. What it downloads, I'm not sure, but at 8kB it's not the video (which is around 200kB). So, what am I doing wrong here? I'd like to mess with it more but alas, if I upload something and it doesn't work, I usually run out of time to fix it. So, How can I get the file (video003.mpg) to play in the window instead of trying to download?

Any input would be appreciated. Thanks!

P.S. to Admin - I don't want to sound like I'm jumping on everyone on the first day, but I just wanted to mention that it took me a while to get registered because the form didn't tell me the ID I had picked (which was "DOS") had apparently already been taken. It just kept reloading saying that all the spaces with *'s had to be filled out.
Thanks again,

-DOS989
  • Drizzt
  • Born
  • Born
  • Drizzt
  • Posts: 2
  • Loc: USA

Post 3+ Months Ago

Hey everyone. I am trying to put a video on my site, and it takes a very long time to load it. It takes pretty much the same amount of time to load the SWF as it does to play it. Anyway, I am going to try to stream the video, but I have never done it before and am not sure how to do it. Does anyone know of a free way to stream videos?

Thanks.

-Drizzt
  • budicek
  • Born
  • Born
  • budicek
  • Posts: 1

Post 3+ Months Ago

Hallo everybody.
Can anybody help me? On my web page I need to play video, for example in .avi format in new pop-up window(but can I do that without make a new html pages?).
For example, i have file video.avi, link is used on my web page, when man click on this link I need, that this video.avi will play in new pop-up window streamed.
A great example, how I wish to do that is on amazon.com, for example, playing mp3s on this link...
http://www.amazon.com/Endless-Summer-Be ... F8&s=music

Can anybody help me to do like that?
Thanks
  • viciousviking
  • Born
  • Born
  • viciousviking
  • Posts: 2

Post 3+ Months Ago

Hi,

I'm relatively new to this part of web design, I play around with the basic stuff, but, now I need to make my website more attractive with video and audio content....

Currently this is what I have:

http://www.crescendopromotions.net/php/Videos.php

What I'm looking to do is:

http://vids.myspace.com/index.cfm?fusea ... 2030502163

As a newbie I'm code challenged :(.....Please help!

I may take sometime to grasp and/or understand the concepts...so please bear with me...

Cheers!
  • lauraeast
  • Born
  • Born
  • lauraeast
  • Posts: 2

Post 3+ Months Ago

Hi

This is my first attempt to put a video onto a web page andit has so far been pretty dismal !

Here is what is in my code, I get the control panel and when you hit play I can hear the video but cannot see it ?!

Any help would be very much appreciated !!

Thx

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="256">
<param name="fileName" value="S8300147.avi">
<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="S8300147.avi"
name="MediaPlayer1" width=280 height=256 autostart=1 showcontrols=1 volume=-450>
</object>
  1. <object id="MediaPlayer1" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
  2. codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
  3. standby="Loading Microsoft Windows® Media Player components..." type="application/x-oleobject" width="280"
  4. height="256">
  5. <param name="fileName" value="S8300147.avi">
  6. <param name="animationatStart" value="true">
  7. <param name="transparentatStart" value="true">
  8. <param name="autoStart" value="true">
  9. <param name="showControls" value="true">
  10. <param name="Volume" value="-450">
  11. <embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="S8300147.avi"
  12. name="MediaPlayer1" width=280 height=256 autostart=1 showcontrols=1 volume=-450>
  13. </object>
  • lauraeast
  • Born
  • Born
  • lauraeast
  • Posts: 2

Post 3+ Months Ago

Hi

Anyone any ideas why I can't see my movie ?

Thanks
L

lauraeast wrote:
Hi

This is my first attempt to put a video onto a web page andit has so far been pretty dismal !

Here is what is in my code, I get the control panel and when you hit play I can hear the video but cannot see it ?!

Any help would be very much appreciated !!

Thx

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="256">
<param name="fileName" value="S8300147.avi">
<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="S8300147.avi"
name="MediaPlayer1" width=280 height=256 autostart=1 showcontrols=1 volume=-450>
</object>
  1. <object id="MediaPlayer1" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
  2. codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
  3. standby="Loading Microsoft Windows® Media Player components..." type="application/x-oleobject" width="280"
  4. height="256">
  5. <param name="fileName" value="S8300147.avi">
  6. <param name="animationatStart" value="true">
  7. <param name="transparentatStart" value="true">
  8. <param name="autoStart" value="true">
  9. <param name="showControls" value="true">
  10. <param name="Volume" value="-450">
  11. <embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="S8300147.avi"
  12. name="MediaPlayer1" width=280 height=256 autostart=1 showcontrols=1 volume=-450>
  13. </object>
  • kikwete
  • Novice
  • Novice
  • kikwete
  • Posts: 17

Post 3+ Months Ago

You can make your Web site more dynamic by adding video to it. By using Microsoft Office FrontPage 2003, you can embed a video directly in a Web page so that it downloads automatically when a site visitor opens the page. You can also add a hyperlink in your Web page to the location of a video file. This enables site visitors to decide whether or not they want to download it.
  • tekila
  • Born
  • Born
  • tekila
  • Posts: 1

Post 3+ Months Ago

Hello all im new here :)

Im using thsi code but only player shows and it sias that it is "Ready"
But i cant play movie ;[



Code: [ Select ]
<object id="MediaPlayer1" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" width="280" height="256" codebase="http://activex.microsof/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows® Media Player components..." type="application/x-oleobject">
<param name="fileName" value="RussianStyle.avi" />
<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" width="280" height="256" src="RussianStyle.avi" pluginspage="/www.microsf/Windows/MediaPlayer/" name="MediaPlayer1" autostart="1" showcontrols="1" volume="-450"></embed>
</object>
  1. <object id="MediaPlayer1" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" width="280" height="256" codebase="http://activex.microsof/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows® Media Player components..." type="application/x-oleobject">
  2. <param name="fileName" value="RussianStyle.avi" />
  3. <param name="animationatStart" value="true" />
  4. <param name="transparentatStart" value="true" />
  5. <param name="autoStart" value="true" />
  6. <param name="showControls" value="true" />
  7. <param name="Volume" value="-450" /> <embed type="application/x-mplayer2" width="280" height="256" src="RussianStyle.avi" pluginspage="/www.microsf/Windows/MediaPlayer/" name="MediaPlayer1" autostart="1" showcontrols="1" volume="-450"></embed>
  8. </object>
  • southdeltan
  • Born
  • Born
  • southdeltan
  • Posts: 3

Post 3+ Months Ago

I know this is a very old thread - but it was at the top of the google search and has good info in it - however I'm having a problem with this code:

Nunzio390 wrote:
Code wrote:
<object id="MediaPlayer1" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://EDITTED/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://EDITTED/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.


The player displays on the page but nothing happens when I click the play button.
  • Zealous
  • Guru
  • Guru
  • User avatar
  • Posts: 1244
  • Loc: Sydney

Post 3+ Months Ago

lol get some clip bucket happening as a video management system and embeded the video's into the site and even use youtube servers to hos the content. There is a lot of work in the setup and shared hosting is not recommended for this script either from the server-load and traffic it uses.

Post Information

  • Total Posts in this topic: 49 posts
  • Users browsing this forum: No registered users and 36 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.