Slidecasting v2
The problem with my previous attempt to slidecast a movie, pdf2ogv, from OpenOffice Impress was the lack of flexibility.
If you just have a set of pictures or simple slides, that approach is simple and straightforward. But what if we want to add some animations and be able to draw the audiences attention to something. In those cases, generating a new slide for each animation effect is overkill.
I want an approach that can leverage the built-in features of OpenOffice (and happens to be extensible to any screencast).
To start, we have the exact same setup as in pdf2ogv:
- An OpenDocument Presentation (.odp) file from LibreOffice
- audacity project file (.aup) with audio recorded as one track per slide
INSTRUCTIONS
- Setup the initial slide presentation in LibreOffice or OpenOffice.
- Record (or open) the presentation audio track in audacity
- Ensure each slide is on a different track and that the tracks are ordered sequentially
- Export the recorded audio as a single .wav file
- Run the following parse-aup (gist) code on the audacity .aup project file to output the slide times for each track
#!/bin/sh # Convert a PDF slide presentation and audio track into an OGV video # Copyright (C) 2012 William Heinbockel <heinbockel@redhat.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. if [ $# -ne 1 ] then echo "Usage: $0 audacity.aup" exit 1 fi if [ ! -r "$1" ] then echo "Error: cannot find audacity file: $1" exit 1 fi # Get track lengths cat <<- EOF | xsltproc --novalid --nonet - "$1" <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a="http://audacity.sourceforge.net/xml/"> <xsl:output method="text"/> <xsl:variable name="rate" select="/a:project/@rate"/> <xsl:template match="/a:project"> <xsl:for-each select="a:wavetrack"> <xsl:value-of select="concat('Slide ',position(),': ',round(sum(a:waveclip/a:sequence/@numsamples) div \$rate),'s')"/> <xsl:text> </xsl:text> </xsl:for-each> </xsl:template> <xsl:template match="text()"/> </xsl:stylesheet> EOF
Open the .odp presentation file
Select the first slide. Then go to the top menu and select Slideshow > Slide Transition…. Under the Modify Transition section, select the value for the Speed (recommend Medium), then choose the Sound drop down. In the file chooser panel, select the .wav file you exported from Step 2.
Go to menu and select Slideshow > Slide Transition…. Fill out the Advance Slide > Automatically After value with the slide timings (Step 3) for each slide
Use audacity and the audio file to play and sync the custom animations on each slide with the narrative.
BEWARE: The slide transition timings set in the previous step do not start until the last animation finishes! If you have animations, you will have to adjust the times accordingly!
Capture the timed slide show using a screen capture software
- It is recommended that you scale your screen size down to 800x600 before recording
- If you are using Gnome3, just start the presentation and immediately press ctrl + alt + shift + r, wait for the slide show to finish, and press the key combo once more to stop recording. This produces a Screencast-….webm file in your $HOME directory. (Note: this will not capture the audio)
Combine the audio and video container. I prefer to use ffmpeg. (The Screencasting_fedora-av-splice.sh script available here should work as well.)
- To keep the .webm format:
ffmpeg -i "Screencast.webm" -i "audio.wav" -map 0:0 -map 1:0 \ -filter:a earwax -ar 32000 -c:a libvorbis -c:v copy "output.webm"
- To record the .webm into an Ogg .ogv container:
ffmpeg -i "Screencast.webm" -i "audio.wav" -map 0:0 -map 1:0 \ -filter:a earwax -ac 2 -ar 32000 -c:a libspeex -c:v libtheora -r 10 "output.ogv"
SLIDE TIMING TIPS
It bears repeating:
The automatic slide transition timings do not start on a slide until all of the custom animation effects have finished.
To that end, here are some tips to help figure out the proper timings.
Use the timings from parse-aup as the master list of slide times
Prefer effects to be timed to start With previous as this makes it easier to determine and adjust timings
When dealing with lists of text, add each row as a new effect. Avoid using the Text Animation effect options as these effects to not seem to properly finish and transition to the next text. Due to these effects not finishing, the slide timer will never start.
When timing custom animations:
Open the audio in audacity and go to the track for the slide
Find the point in the audio where you want the effect to start
Use the audacity selection tool to figure out how far into the track you need to wait. Audacity gives timings in second increments and OpenOffice allows for half-second precision, so give it your best guess
Add the effect as normal
Right click on the effect and select Timing…
For Start, choose With previous. This will start the delay count down when the slide transition occurs
For Delay, enter in the time we got from audacity
Go to the Slide Transition menu for the slide. Subtract the delay time from the overall Advance Slide > Automatically After time
Discussion