Wermerb
Wermerb

Reputation: 1049

How can I embed an mpg into my webpage

I would like to embed mpg (dvd compliant mpeg2) movie files to my web page. I do not have any chance to convert these videos to any other format. This web is only for personal use so any type of solution would be perfect.

Really appriciate any advice or solution.

Here is my code:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>

<body>

<embed src="my_video.mpg" autostart="false" height="350" width="500" />

</body>
</html>

SOLVED:

My solution for this problem was that i had to reinstall the wmp plugin for my browsers and its working fine

Upvotes: 5

Views: 29216

Answers (2)

Dumbo
Dumbo

Reputation: 14112

Try this (Works with IE)

<EMBED SRC="movie.mpg" AUTOPLAY=true WIDTH=160 HEIGHT=120></EMBED>

edit: Hmmm that works for me. You can try this as an alternative:

<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="your_file.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="your_file.mpg" name="MediaPlayer1" width=280 height=256 autostart=1 showcontrols=1 volume=-450>
</object>

Also make sure you have the right codecs installed on your PC

Upvotes: 1

afaf12
afaf12

Reputation: 5426

<video width="500px" height="350px" autobuffer="autobuffer" autoplay="autoplay" loop="loop" controls="controls">
    <source src='my_video.mpg' type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
</video>

Source

Video tag specification

Upvotes: 2

Related Questions