Plays For Certain makes inserting media in PowerPoint simple.
Create Text Over Video and Closed Captioning
   
 "I can't believe you guys are giving away all the code for this!  I think its great you want to help others."

Pauo Chen
Home  |  Downloads  |  Multimedia Tutorials  |  Product FAQ  |  Links  |  Contact Us  |
   
   
A Method to Place Text Over Video in PowerPoint
 

I am often asked if there is a way to place text over video and until recently I have said no, not without one of the third party add ins available on the market. However, you can do it with a small PowerPoint macro.  The key to doing this is to use a textbox control to hold the text. (Not PowerPoint textboxes.)

What is a Control?  A control is often referred to as an "ActiveX" control. For most purposes you can think of it as a really small program that other programs can use. It has its own set of "properties" that you can edit and set manually or with a minimal amount of program code. (Don't panic, it's not as hard as you think.) In PowerPoint, adding a control to your slide could not be easier. If your Control Toolbox is not visible, click View > Toolbars, and "check" the box for "Control Toolbox".

This is a screen shot of a single slide presentation I put together to demonstrate how to use a set of controls and manipulate the text and background color with very, little programming.  From the control toolbox I inserted a "Label" on top of a video and 4 buttons.  Each button places different text over the video during the presentation. That's it for the slide, now for just a tiny bit of code. As you can see we have provided a few lines of code for each "Button" that runs when it's clicked. Remarks are in green and are there for explanation only, they have nothing to do with the actual program.

Private Sub Text1_Click() 'Clicking the "Text 1" button executes the next line of code.
Label1.Caption = "This is a new line of Text."
'Changes the text in the label.
End Sub
'Ends the code and waits for your next click.

Private Sub Text2_Click()
'Clicking the "Text 2" button executes the next line of code.
Label1.Caption = "Something entirely different." '
Changes the text in the label.
End Sub
'Ends the code and waits for your next click.

Private Sub Text3_Click()
'Clicking the "Text 3" button executes the next line of code.
Label1.ForeColor = RGB(255, 0, 0)
'Here we change the color of the text.
Label1.BackColor = RGB(255, 255, 0)
'Here we change the color behind the text.
Label1.Caption = "Get their attention!"
'Changes the text in the label.
End Sub
'Ends the code and waits for your next click.

Private Sub Original_Click()
'Clicking the "Text 4" button executes the next line of code.
Label1.Caption = "Original line of text."
'Changes the text in the label.
Label1.BackColor = RGB(255, 255, 255)
'Here we change the color behind the text.
Label1.ForeColor = RGB(0, 0, 0)
'Here we change the color of the text.
End Sub
'Ends the code and waits for your next click.

That's it! With this bit of "code" you are able to alter the text displayed as well at it's color and background color.  But what if I don't want buttons? What if I want the text to "animate"? What if I want to use text contained in a file? All of these are possible by expanding upon the programming code and we invite users to experiment. However, teaching how to write code in Visual Basic is beyond the scope of this tutorial. We simply wanted to demonstrate that it can be done and give users a small program sample as a starting point. You may download this example to experiment with it.

 

Expand this Concept to Create Closed Captioning

Creating and using Closed Captioning is a two step process or system.  The reason we broke it into two discreet components is so you may distribute a presentation with closed captioning without the need to include the creation tools of the add-in.  (Keeps the file size down and simplifies it for the recipients.)

We begin by first inserting the video on the slide and then add a "Label" from the controls toolbox and place it on top of the video.  This label will display our text kept in a standard *.txt file that must be distributed with the presentation.

Next we create the text file, populate it with our text, and set timings for when the text will be displayed.  This is accomplished with the Closed Captioning add-in that you may download here.  It is important to understand this add-in does not need to accompany the presentation when it is distributed, only the PC creating the captioning requires the add-in.

However, there is a small macro that must be included as part of the presentation to support the closed captioning  features. (See Below)

Here is a screen shot of the text creation add-in used to populate the captioning text file.  This file is created automatically and shares the same name as the video file you are working with, only the file name extension is different.  The add-in includes the Windows Media Player so that you can preview the video as you work.  We included the ability to adjust the playback speed of the media file to make timing of the text easier.

You may also change the color of the text as well as the background of the label to improve visibility as needed or desired.  We also display the last six lines of text entered to make it simpler to keep track of where you are at in the creation process.  Timing of when a line of test is displayed is set when you click the "Save Text & Settings" button.  This is everything needed to create the closed captioning file.

As noted above, a small macro is required in order for the closed caption to function.  It's roll is to read the text from the file created for the captioning and display it in the Label (placed on top of the video previously) at the appropriate time.

 

To make it simpler for you we implemented the required macro in a pre-built slide that you may use in your presentation.  This must be the very first slide of the presentation.  Your recipient then has the option of running the presentation with or without closed captioning, however, the macro must be in place for the closed captioning to work properly.  You may alter this slide as needed but we strongly recommend leaving the two option buttons in place and ask that if you use this slide that you leave the Plays For Certain link in place so others can learn of and download the closed captioning system for their own use.  We have included this slide in a presentation with a closed captioned video that you may download here.

We believe that helping those with a hearing disadvantage is something that should be done simply because it is the right thing to do.  For this reason we are giving this system away freely and without limitations in how it may be used.  Further, it is our hope others will take this example an improve upon it so we will give anyone that wants it the entire source code for the system.  If you would like to work directly with the source code simply drop us an Email and we will gladly forward it to you. (Contact Page)