Create slideshows like a pro, and for free

12/04/2010 by Sylvain Hallé

I discovered that, despite all its good features, SlideShare's slideshow option was not adequate for me. I was hence left with a nice, do-it-myself weekend project trying to do better with a bit of coding and a bunch of free tools. Here's how you can do it.

What files you need

You need to have all these files, copied in the same folder for convenience:

To simplify things, try to have the same filenames as in the tutorial --you can rename the files to your liking once you're done. Otherwise, make sure you replace the names appearing here with your own filenames.

What software you need

If you don't have the following, please install them using the default options before moving on. All of these are free.

Step 1: setup the time points

The first part of the work is the most tedious one: you must write down the moments in the audio file where you move to the next slide. These will be expressed in the number of minutes and seconds elapsed from the beginning of your speech.

To do so, open Soundtrack.mp3 in your audio player, and start playing the file with your slideshow at hand. When the audio reaches the moment where you need to go to the next slide, press Pause on the audio player and write down the elapsed time. Most audio players have a cursor that you can move around to jump back or forward, so if you missed the cue, you can rewind a few seconds and try again.

Screenshot

You will then insert these "cuepoints" throughout the text file Slidecast.txt containing the transcript of your audio, as follows. Suppose this is the text for the beginning of my presentation:

Hello, my name is Sylvain, and this is my super duper
presentation. You will see how the sildes change
automatically when I jump to the next topic.

You see? Now we are at the second slide, and if we
had a third one, we could jump to it as well.
...

Your first cuepoint is (obviously) slide number 1 at the beginning of the first paragraph. This corresponds to the beginning of the audio file, so 0 minutes and 0 seconds. You write this as *#*mm:ss.xxx*, where:

If your media player doesn't show milliseconds, you can just replace them with "000". So the first cuepoint is written *1*00:00.000*, and you place it at the beginning of your file, in front of the first paragraph:

*1*00:00.000* Hello, my name is Sylvain, and this is my super duper
presentation. You will see how the sildes change
automatically when I jump to the next topic.

You see? Now we are at the second slide, and if we
had a third one, we could jump to it as well.
...

Suppose now you measured that the second slide should be shown at 7.5 seconds from the beginning, you insert the second cuepoint at its appropriate location in the text:

*1*00:00.000* Hello, my name is Sylvain, and this is my super duper
presentation. You will see how the sildes change
automatically when I jump to the next topic.

*2*00:07.500* You see? Now we are at the second slide, and if we
had a third one, we could jump to it as well.
...

...and so on. A slide change can occur in the middle of a sentence:

...
If we continue talking, you will realize that

*3*00:14.000* I switched to the next slide while
I talked.

Just make sure that a cuepoint is separated with a blank line from the previous text, and begins at the start of the new line. Similarly, a paragraph that doesn't start with a cue point is just that: a paragraph, and is considered as the continuation of the text for the current slide.

Finally, finish your text with the end time for your audio file. Mine was 32 minutes and 52 seconds long, so I put this as the last line of my text file:

*END*32:52.000*

Step 2: Generate the slidehow

The first step was rather tedious, but once your text is annotated with the slidechanges and time points, a lot of fun things can be done automatically. First, you can load the PHP script I created:

Screenshot

If you used the filenames in this tutorial, the default values are setup properly. Just copy-paste the contents of the (now annotated) Slidecast.txt in the "Cue marks" textbox and press Send.

The script will return a page with a bunch of commands like these:

# --------------------------------------------------
# Auto-generated file by AviSynth Slideshow
# (C) 2010 Sylvain Halle
# --------------------------------------------------

video = ImageSource("Slide_001.jpg", fps=4).BicubicResize(640,480).Trim(0,98)
video = video + ImageSource("Slide_002.jpg", fps=4).BicubicResize(640,480).Trim(0,79)
video = video + ImageSource("Slide_003.jpg", fps=4).BicubicResize(640,480).Trim(0,60)
...

Save that file as "Slidecast.avs" (leave the quotes) into the same folder as the rest of your sliecast files.

Step 3: Save the slide show as a video

Now open VirtualDub, an in the File menu, click Open and select Slidecast.avs. (You may not see the file in the list; if this is the case, make sure that the "Files of type" drop-down list at the bottom is set to "AVIFile input driver".)

Your file should open as a video, showing the first slide:

Screenshot

VirtualDub provides controls to play the file. However an AviSynth script file like the one you just loaded is a bit different; don't press the Play button or move around the file unless you know what you're doing. (If you're curious, more on that later.)

To export your presentation as a video, you must setup compression settings for audio and video:

  1. In the Audio menu, choose Direct Stream Copy
  2. In the Video menu, choose Full Processing Mode if it is not already checked
  3. Go back to the Video menu, and choose Compression...
  4. At the left is a list of compression formats, or codecs. You can pick any one, but for this tutorial select "MidiVid JPEG Codec". (If you think using DivX or other stuff, see below.)

    Screenshot

  5. Leave the Quality slider to a relatively high value (say, at least 80). Click OK.
  6. In the File menu, choose Save as AVI. Save it as Slidecast.avi.

Depending on your computer's speed and the length of your slidecast, the process can take from a few seconds to several minutes. Be patient.

Screenshot

Once this is done, you can double-click on Slidecast.avi or open it into any media player, such as Windows Media Player. It should show the slides that change along with the audio, at the timepoints you gave in your text file. Voilà!

Bonus: generate the subtitles

Since you have the complete transcript of your slidecast AND a bunch of cuepoints telling how that text is distributed over time, for free you can also generate a subtitle file that can be used to display text over your video, like in movies.

Of course, you realize that you probably say a lot of text over a single slide --certainly much more that what can fit in one or two lines of text at the bottom of the screen. The trick is this: since we know how long each slide lasts, we will split its associated text into 1 or 2-line snippets and spread them evenly over the total duration of the slide. I tried it with my own slidecast, and I was surprised how closely the text follows the audio --almost as if someone used a teleprompter!

Doing so is really simple with my script: go back to the PHP script, and in the first radio button ("Generate"), select Subtitles instead of Slideshow. Copy-paste Slidecast.txt into the text area and click Send.

This time, the script produces another text file that looks like this:

0
00:00:00,000 --> 00:00:03,750
Hello, my name is Sylvain, and this is
my super duper
presentation. You will see how the

1
00:00:03,750 --> 00:00:07,500
sildes change
automatically when I jump to the next
topic.

2
00:00:07,500 --> 00:00:10,750
You see? Now we are at the second
slide, and if we
had a third one, we

3
00:00:10,750 --> 00:00:14,000
could jump to it as well.
If we continue
talking, you will realize that

This is a file in the SubRip (SRT) format. Each bunch of text is one subtitle; notice how the text for the first slide in our example (lasting 7.5 seconds) has been split into two cards lasting 3.75 seconds each. Like previously, save that file as "Slidecast.srt" (with the quotes).

If you re-open Slidecast.avi in your media player, this time the subtitles, taken from the file, should also be shown as you talk (this happens every time an xxx.srt file exists in the same folder as xxx.avi. In my case, the result was spookily faithful.

Screenshot

Some online services, such as YouTube, allow you to attach subtitles to an online video.

Neat, eh? And all this with a few free tools and a bit of scripting.

For pros: dabbling with default settings

I leave this for the the next post.

comments powered by Disqus

Navigation