PresVoz
Introduction
Presentations with voice are a simple trick to have vector video for presentations.
Video is mainly images with synced voice. These presentations are made the following way:
- Audio in these presentations is recorded voice and it is compressed to a very high rate (32 kbps).
- Images are just single slides extended to its required duration.1
This results in two main benefits:
- Much smaller size in final output.
- Highest image quality (when using vectors).
Of course, this is just a trick and not a miracle. You can’t have it all.
- Sound compressed to higher rates (such as 320 kbps) would result in higher output sizes too.
- Any kind of bitmap images (including video) will keep its quality, not (automagically) improve it.
How It Works
Since presentations with voice are played voice with synced slides,
- PDF document with only the slides.
- MP3 file with the recorded sound.2
- Pure–text file with transition times in each line (in milliseconds).
This generates the final presentation in two formats:
- PDF document with JavaScript to sync sound and slides.
- SWF animation,3 displayed by ˚Ruffle (see Samples).
Given the three source files, presentations are generated by PresVoz, which is a ConTeXt module.
The module also includes GVoz, which is a simple Python script to record voice and transition times (as required by PresVoz to do its magic). Both samples describe and display how GVoz works.
Installation
PresVoz is a ConTeXt module that can be installed simply with the current version of ConTeXt LMTX.4
The installation command reads:
mtxrun --script install-modules --install presvoz
But this only works from the $SELFAUTOPARENT
directory.5 This is basically the tex
directory inside your ConTeXt distribution (wherever it may be installed).
Documentation
The module contains documentation for both PresVoz and GVoz (inside its documentation directory).
A single PDF document for each, although there is not much to be explained.
The module documentation also contains a presentation sample (a much better alternative to my samples) in both PDF and SWF files.6
Issues
PresVoz is far from being perfect and it might contain issues. The same happens for GVoz.
Since this module is not properly typography or typesetting (and not especially related to ConTeXt),7 please don’t report issues in the ConTeXt mailing list. ConTeXt and LuaMetaTeX are the beasts that allow PresVoz to do its magic (but all errors are mine).
Although it is included in the module, GVoz is totally unrelated to ConTeXt. It is a Python script that displays pages from PDF documents and records sound from you computer.
Please, keep in mind that I cannot properly code, that this is a pet project for me and I only dedicate my scarce free time to it.8
Consider that you may experience issues with external code (such as any dependency, SWFTools, Ruffle or even Acrobat). But these are not my fault 😁.
Samples
There are two presentations included as samples: one in English and another one in Spanish.
Before you start watching them, consider that Spanish is my mother tongue and that English may be my third language (still).
License
PresVoz is licensed under the second version of the GNU General Public License (the license for ConTeXt). GVoz is realeased under the third version of that license.
The code comes with no warranty. Use at your own risk. It is highly probable that it may contain bugs. If you can’t deal with them (or simply don’t want to), don’t use PresVoz or GVoz.
Notes
-
In standard video, the same slide means the number of frames per second times the number of seconds. (This leaves video compression technique aside.)
In the so–called “vector video”, one slide is only included as a single frame and its duration takes as required.
For example, a 25″–long slide involves 625 frames (being 25 fps the frame rate) in standard video, but only one with this method. ↩
-
PresVoz may try to convert WAV files to MP3, but this requires LAME to be properly installed on your system. ↩
-
Just in case you wonder, see Flash after 2020?. ↩
-
As distributed by Pragma ADE. I’m afraid I had to explicitly avoid the inclusion of PresVoz in TeX Live. So it works better for both parts. ↩
-
You can get it by compiling the following source:
\starttext \startTEXpage[offset=1dk] \cldcontext{os.getenv("SELFAUTOPARENT")} \stoptext \stopTEXpage
If you have ConTeXt installed in a
context
directory inside your user main directory, it would be%USERPROFILE%\context\tex
in Windows or$HOME/context/tex
in Unix (Linux and macOS). ↩ -
Just in case you wonder, all presentations in SWF format contain the presentation (named
-presentation.swf
) and a loader (named-loader.swf
).The loader displays the first slide of the presentation at a negligible file size. The presentation is only loaded if its main button is pressed. With the loader, only Ruffle is loaded to display the page (without further interaction). ↩
-
PresVoz only abuses ConTeXt as a PDF library. It is the only way I have to have a working method for myself (that others may use, if they see it fits them). ↩
-
This means that it may well take a week or two before you get a reply to any issue report. Remember that all this comes with no warranty (as per License). ↩