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

  • CGFX
  • Graduate
  • Graduate
  • User avatar
  • Posts: 164
  • 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
  • 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: 164
  • 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: 164
  • 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: 164
  • 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: 6890
  • 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: 6890
  • Loc: up a tree

Post 3+ Months Ago

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

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: 24

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: 3431
  • 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: 24

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?
  • 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
  • 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: 164
  • 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: 1305
  • 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 22 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-2016. Ozzu® is a registered trademark of Unmelted, LLC.