Converting Presentation to Video
Updated 2012-10-23: Experiments show that using MP4 instead of Ogg/OGV yields to a better quality in video and audio with a reduced file size. View my current pdf2mp4 script in my GitHub repo.
As part of my job, I develop training courses to help teach developers about software security. This results in lots of tips, articles, and slide decks. While articles and tips are standalone, slides require further explaination. Slides should never be made to be independent; otherwise, you end up with walls of text and glazed-over, uninterested audiences.
To make the slide content standalone, it needs to be combined with an audio voiceover track. Producing the slides and the audio presentation are straightforward, but combining them into a video was anything but.
Searching through the interwebs and forums yielded little promise. Most solutions were either commercial products, were missing essential features, or would require a lot of customization. Screencasting was not a solution as it would require me to play the audio and manually traverse the slides.
Each presentation contains:
- An OpenDocument Presentation (.odp) file from LibreOffice
- audacity project file (.aup) with audio recorded as one track per slide
Here is my solution, pdf2ogv—a program that combines a PDF slide deck with an audio track to produce an Ogg OGV video container with speex-encoded audio.
INSTRUCTIONS
Create (or open) a presentation slide deck. Save the deck as PDF with one slide per page
- For OpenDocument (.odp) or Microsoft PowerPoint presentations, this can be done via File > Save As or File > Export
- For HTML presentations, you can use something like phantomjs to automatically capture each slide as an image
Record (or open) the presentation audio track in audacity
- The audio for each slide is on a different track and that the tracks to not overlap
- Sync-Lock the tracks ( Tracks > Sync-Lock Tracks )
- Add 1+ seconds of lead-in time (either as silence or music) to the first track
- Add 1+ seconds of lead-out time to the final track
Save the recording as an audacity project
Export the audio to a single wav file ( File > Export… ) (This step is necessary as there is no easy way to convert the audacity .au files into a single wav)
Run pdf2ogv as follows:
pdf2ogv slides.pdf audacity-project.aup slide-audio.wav
DEPENDENCIES
pdf2ogv requires audacity, SoX, ImageMagick, ffmpeg, libxslt, and dvd-slideshow
Download dvd-slideshow and either install it (./install.sh) or at least make the dvd-slideshow command accessible in $PATH
ffmpeg is available through RPMFusion:
sudo rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm sudo yum update sudo yum install ffmpeg
The remaining files are available from the Fedora repository via yum:
sudo yum install -y sox audacity libxslt imagemagick
pdf2ogv
Note: An MP4 video seems to give a better quality/size ratio. See my pdf2mp4 script.
The pdf2ogv code is made available under the GPLv3 license and is available as a gist.
Discussion