View Full Version : Embedding AVI's in a webpage
ThePanther
30th July 2003, 10:19
Guys,
Can anyone tell me, what is the best Codec to use. I want to embed a small AVI file in a webpage. I want to use a codec that will be available on all windows based machines. It must have good compression and good quality.
Any ideas ?
Or can anyone tell me how I have embed a DivX AVI into a webpage but if the DivX codec is not available it will show a message saying where to download it from.
Thanks a million
Imperial Llama
30th July 2003, 12:03
I don't think Windows comes with any decent codecs, certainly not any that will seem good if you are used to MPEG-4 based codecs such as DivX. One idea I have heard people suggest for embedding video clips in webpages is to use Flash MX. Apparently it comes with some Sorenson codec that is supposed to be quite good for low bitrate videos. Anyone viewing the webpage who didn't have the latest version of the Flash plug-in would be redirected to download it, and it's only a 500KB download.
I've not tried this though so I this is only based on what I've heard other people say. Personally I would just provide the video as a separate download so people aren't forced to download videos they don't want to watch.
unmei
1st August 2003, 19:27
this might help you get started:
<body>
<object id="my_AVI"
width="320" height="290"
classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
standby="Chargement de Windows Media Player..."
type="application/x-oleobject">
<param name="FileName" value="TLFintro1-DivX-25fps-mp3-192.avi">
<embed
src="TLFintro1-DivX-25fps-mp3-192.avi"
type="application/x-mplayer2"
name="VideoAVI"
loop="0"
hspace="0"
vspace="5"
palette="foreground"
frameborder="NO"
border="0"
hidden="FALSE"
title="Me sleeping in a bush after a long night">
</embed>
<noembed>
<img
src="cannotplay.jpg"
width="320"
height="290">
</noembed>
</object>
<object
id="ActiveMovie1"
classid="CLSID:05589FA1-C356-11CE-BF01-00AA0055595A"
type="video/mpeg"
standby="please wait while video loads.."
width="320" height="290"
vspace="10" hspace="10">
<param name="ShowDisplay" value="0"/>
<param name="ShowControls" value="0"/>
<param name="AutoStart" value="1"/>
<param name="PlayCount" value="10"/>
<param name="FileName" value="TLFintro1.mpg"/>
<!-- Compatibilité avec Netscape -->
<embed
src="TLFintro1.mpg"
autostart="true" loop="true"
width="320" height="290"
vspace="10" hspace="10"/>
<noembed>
<img
src="cannotplay.jpg"
width="320"
height="290">
</noembed>
</object>
</body>
the first is used to embed a AVI video, the second for mpeg-1. both will play on loaded.
For the AVI it makes no difference in the html code whatever is inside the avi, but mediaplayer must be able to decode it.
Now for windows user, DivX is not automatically installed so if you want any windows user to be able to play it you'll choose a codec such as Indeo 4, which installed on any windows but is by fas less efficient than mpeg-4 codecs...
Therefore i think of the mpeg-1 as a real alternative. It will be playable on any windows - and non-windows users have a big chance it will work for them too (maybe not embedded, but they can get it to play on a external player) AFAIK all recent OSes (linux, OSX, Solaris, BeOS, etc) have mpeg-1 support. And with a good encoding tool (i think of TMPEGEnc, free for mpeg-1 :) mpeg-1 does not look THAT bad and takes little ressources to play.
midiguy
1st August 2003, 21:35
Originally posted by Imperial Llama
I don't think Windows comes with any decent codecs, certainly not any that will seem good if you are used to MPEG-4 based codecs such as DivX. One idea I have heard people suggest for embedding video clips in webpages is to use Flash MX. Apparently it comes with some Sorenson codec that is supposed to be quite good for low bitrate videos. Anyone viewing the webpage who didn't have the latest version of the Flash plug-in would be redirected to download it, and it's only a 500KB download.
I've not tried this though so I this is only based on what I've heard other people say. Personally I would just provide the video as a separate download so people aren't forced to download videos they don't want to watch.
Sorenson for Flash MX only supports 1-pass CBR (I think), while regular sorenson supports 2-pass VBR. So that kinda sucks..
ThePanther, alternatively, you might want to encode in sorenson video using the quicktime mov container, and then embed it into the webpage using progressive download and play. Check out quicktime.com and go to trailers. You will find movies trailers there that use the same set up I described above.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.