John R. Dougherty
Guest
|
Posted:
Wed Nov 09, 2005 5:30 pm Post subject:
Forcing a Video Clip to Download before Player Starts Playin |
|
|
I have some .MPG files embedded in my Website. Even on high-speed Internet
connections, the video clips (only about 10 seconds long) still play very
choppy. Once the user watches the video one time, it can be viewed from then
on without any choppiness. I am assuming the clip is downloaded into their
temporary files (cached?) upon the first viewing, then subsequently it does
not have to be downloaded upon every viewing, until those temp files are
deleted.
Is there a way to prevent the user from having to watch the choppy video the
first time, and just have them wait for it to download completely before the
media player starts playing the clip? I can live with forcing my users to
wait that first time - it just looks bad seeing the choppy video play. Some
folks are assuming that it will play that way every time, so they never come
back to try watching the video clips again.
Below is an example of my current code:
<td>
<OBJECT ID="MediaPlayer" WIDTH="400" HEIGHT="300"
CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
STANDBY="Loading Windows Media Player components..."
TYPE="application/x-oleobject">
<PARAM NAME="FileName" VALUE="VBS01.mpg">
<PARAM name="ShowControls" VALUE="true">
<param name="ShowStatusBar" value="true">
<PARAM name="ShowDisplay" VALUE="false">
<PARAM name="autostart" VALUE="false">
<EMBED TYPE="application/x-mplayer2" SRC="VBS01.mpg"
WIDTH="400" HEIGHT="300" ShowControls="1" ShowStatusBar="1" ShowDisplay="0"
autostart="0">
</EMBED>
</OBJECT>
</td>
- Thanks,
JRD
|
|
The Piano Player
Guest
|
Posted:
Thu Dec 29, 2005 9:30 am Post subject:
Re: Forcing a Video Clip to Download before Player Starts Pl |
|
|
Hi John,
Have you tried encoding your MPG files into a much more stream-friendly
format such as WMV or ASF? These formats were specifically designed for
streaming and they shouldn't play in a choppy manner.
Streaming means that the player will download some of the content before
playing it. Once enough content is downloaded, the content will play
while the rest of the it is being downloaded in the background. If not
enough is downloaded during playback, the content will pause and wait
for more content to download.
However, note that these formats are not cached after playback. Your
site-visitors would need to re-load the videos if they are replayed.
Using Windows Media Player, you are able to define the amount of content
to buffer before playback in seconds. Also, using the WMV or ASF format
enables the file itself to choose the suitable bitrate to match the
user's connection speed.
You can encode your media files into the WMV or ASF using the Windows
Media Encoder, which is available here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=5691ba02-e496-465a-bba9-b2f1182cdf24&DisplayLang=en
Jason |
|