Menu:

Links:

Use these links to navigate the FAQ:

Next:
FLASH! PPT2HTML does it!

Previous:
Linked/embedded sounds

All about PPT2HTML index page

Updated
7/25/2016

Microsoft MVP Logo

Converting presentations with movies / videos

PPT2HTML can convert the movies in your PPT files to embedded movies in HTML. It takes a bit of setup and it may not work identically in all browsers or on all PCs, but this will get you started.

There are three steps you must follow to enable movie conversion:

  1. Make sure that the movies are LINKED, not EMBEDDED in your PowerPoint presentation. See Linking vs. Embedding below for more details.
  2. Edit PPTools.INI to enable movie handling and tell PPT2HTML where to find the needed movie embedding code.
  3. Supply the movie embedding code.
  4. Edit your HTML template to tell PPT2HTML where to insert the movie embedding code and how to position the movie.

Don't worry, we have sample code and step by step instructions below.

Once you've done the setup, you don't need to make any further changes. Just create HTML from your presentation using the newly modified template. PPT2HTML automatically adds any needed code to play movies (from the movie embedding code file) and copies any movies into the same folder as the HTML it generates.

Edit PPTools.INI

To enable embedded movie support, you need to tell PPT2HTML the name of a special file that we call the MediaPlayer code template. This file contains instructions for placing movies in your html. To do this, edit your PPTools.INI file:

It should look like this:

[PPT2HTML]
MediaPlayerTemplate=MediaPlayer.txt

The MediaPlayer code template

Here's a working MediaPlayer code template to get you started. You can modify it to suit your own needs, but start with this tested example, get it working, then modify all you like.

Copy and paste the code below into Notepad and save it as MediaPlayer.txt in your PPTools folder. Actually, you can save it under any name you like, so long as the file name and the name you supply in PPTools.INI match.

     
<div id=:MediaPlayer.Movie:
	style="position: absolute;
		background-color: black;
		left: :MediaPlayer.Left:px;
		top: :MediaPlayer.Top:px;
		width: :MediaPlayer.Width:px;
		height: :MediaPlayer.Height:px;" >

<OBJECT id='mediaPlayer' width=":MediaPlayer.Width:" height=":MediaPlayer.Height:" 
      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'>
      <param name='fileName' value=":MediaPlayer.Movie:">
      <param name='animationatStart' value='true'>
      <param name='transparentatStart' value='true'>
      <param name='autoStart' value="true">
      <param name='showControls' value="false">
      <param name='loop' value="false">

<!-- -1 means TRUE, 0 means FALSE --> 
<EMBED type='application/x-mplayer2'
        pluginspage='http://microsoft.com/windows/mediaplayer/en/download/'
        id='mediaPlayer' 
	name='mediaPlayer' 
	displaysize='4' 
	autosize='-1' 
        bgcolor='darkblue' 
	showcontrols="0" 
	showtracker='0' 
        showdisplay='0' 
	showstatusbar='0' 
	videoborder3d='0' 
	width=":MediaPlayer.Width:" 
	height=":MediaPlayer.Height:"
        src=":MediaPlayer.Movie:" 
	autostart="true" 
	designtimesp='5311' 
	loop="false">
      </EMBED>
      </OBJECT>
</div>
<!-- ...end embedded WindowsMedia file -->

<!-- optionally, include this to launch external media player...
        <a href=":MediaPlayer.Movie:" target='_blank'>Launch in external player</a>
...end link to launch external media player... -->

You'll want to play around with some of the parameters above. We have it set to show no controls or other Media Player "furniture" around the movie, and to start the movie automatically. If you make any changes, you'll want to make them in both the EMBED and the OBJECT sections; some browsers will use one, some will use the other.

Note that the OBJECT section uses true/false to turn features on/off. The EMBED section uses 0 for false and -1 to mean true.

When editing either section, don't change the punctuation. A single missing quote mark or semicolon can cause the template to stop working correctly.

Your HTML template

Finally, you'll need to edit your HTML template to tell PPT2HTML where to put the code to launch the movie.
To do this, you add a little CSS code and a special :MEDIAPLAYER.CODE: placeholder.

Here's an example template (our Basic template modified to include the needed MediaPlayer code). You can copy and paste this into Notepad and save it to create your own template.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<TITLE>:Prefs.PageTitle:</TITLE>
</head>
<body>
:Nav.Map:
<center>
<div 
id=DIV1 
style="position: relative; left: 0px; top: 0px; width: :Slide.Image.width:px; height: :Slide.Image.height:px;">
<IMG SRC=":Slide.Image:" width=:Slide.Image.width: BORDER="1">
<!-- We've inserted the new placeholder directly beneath the code that specifies the slide image -->
:MEDIAPLAYER.CODE:
</div>
</center>
<center>:Nav.LinksToAll:</center>
</body>
</html>

Caveats, Disclaimers, Fine Print

When you use the template and other modifications above, it will create links in your HTML that work as long as several conditions are met:

In addition, keep in mind that movie files tend to be very large. Before the movie can play, it must download completely to the user's PC. Users may become impatient and click to the next slide before the movie starts. For the same reason, PPT2HTML may seem to "hang" as it's creating HTML from a particular slide. Be patient ... it may be because a movie file on the slide is very large. Allow a little extra time to allow PPT2HTML to copy the file to the output folder.

Linking vs. Embedding

PowerPoint 2010 and later embed rather than link video and sound files by default. This can be a convenience when you need to move presentations containing videos from one computer to another but it causes other problems.

For example, once PowerPoint has embedded a video, it doesn't keep a record of where the video file originated and it doesn't give PPT2HTML any way to extract the video file.

Result: PPT2HTML can't include the video file in the set of files needed to convert your presentation to HTML.

The fix? Link the video files instead. PowerPoint used to link video and sound files by default, and it still allows you to link them if you wish. Here's how:

That'll give you a linked video that PPT2HTML can locate and include in the HTML files it produces for you.

And as a bonus, the PPT/PPTX files you save from this presentation will be compatible with previous versions of PowerPoint; linked videos work with all PowerPoint versions; embedded videos only work in PowerPoint 2007 / Service Pack 2 and later.

Tested Browsers

We've tested a small sample of movies and HTML files in the following browsers and found that the results are as expected:

We didn't have much luck with these browsers:

Our tests were not extensive and couldn't possibly include the wide variety of security and other settings you might run into "in the wild". If you know of settings or other changes that would allow our "non-working" browsers to work, please let us know.

[Previous] [Home] [Next]