Discrete Mathematics
Hans Georg Schaathun

About the Teaching Materials

Discrete Mathematics

This page is for teachers and others who might want to adopt some of the techniques that I have used.

Web pages

The web pages are hand-edited, static HTML. PHP is used only to include elements which are shared between pages.

The material is duplicated on two web servers, on the desktop in my office and on a virtual machine in the lab basement. Both run linux (debina/ubuntu) and apache2.

Material is uploaded using rsync or scp with an ssh public key, so that it can be done in batch. Initial installation is on the desktop for testing, and it auto-syncs with the virtual machine every night.


Apart from any run of the mill PC, a few extra pieces of hardware are critical for the way I create video.

Pen Display
The Wacom Cintiq is key to most of the videos I make. It is a screen with a stylus, so that I can draw freehand directly on the screen.
Web Camera
I sometimes use a web camera to make demonstrations with physical gadgets, such as dice for probability theory. Any modern, consumer-end webcam will do.
While no expensive microphone is needed, it is worth thinking twice about the mic. Personally I use a decent headset with mic. A mic in the webcam or built-in on the laptop will usually pick up more background noise.

Operating System

I have had working setups on both Mac OS and Linux.

Mac OS
This was pretty much plug and play. Easy to get started, but remaining cumbersome with practice.
Debian Linux jessie
Linux is obviously much more user-friendly, but somewhat more selective about its friends. With practice, most things are faster. The Wacom Cintiq failed to install on both Ubuntu and on Debian wheezy (then stable). I had to go for jessie (then testing) to make it work.

Video software

Many different software packages have been tried over the two years that I have used flipped classroom in Discrete Mathematics and in Statistics and Simulation. The first month or two, the videos were created on Mac OS; later everything has been created on Linux.

Mac OS software for beginners

Three pieces of software are used. Camtasia is proprietary, the other two are open source and free.

The slides are created in LaTeX and compiled to PDF. The only thing which matters for the next step (skim) is that you have the slides in PDF though.
skim is a program for PDF annotation, i.e. it displays PDF slides and you can draw free-hand upon them in real-time. Your drawing can be screencast as you create it.
Camtasia for Mac
Camtasia for Mac records video from webcam and from screencast as well as from audio, keeping all the streams synchronised. It also support video editing in a GUI, and is very easy to get started with.

Linux software for beginners

as before, slides are created in pdflatex
xournal is PDF annotation software, which works very much like skim. skim is not available in the Debian package repos.
ffmpeg is an extremely general and powerful software tool for video recording and coding, and avconv is a fork thereof. In the first instance we use ffmpeg to record a screencast with sound.
openshot is a simple GUI tool to edit video. We import raw video created by ffmpeg, and edit it, including cropping, splicing, overlays etc.

Note that wheras Camtasia does both recording and editing, we have split the functions between ffmpeg/avconv for recording and openshot for editing.

Linux software for non-beginners

The following tools are the software that I am currently using for video creation. For instance video editing in openshot is simple, but time consuming, and by experience it has proved better to do more of the work using command-line tools.

as before
as before
ffmpeg can not only record screencast, but it can also splice and crop video files, making openshot redundant. To be fair, perfect results can more easily be obtained in openshot, but acceptable results can more quickly be obtained using ffmpeg, and who has time for perfection?
audacity is a sound recording and editing tool (GUI). When no drawing is added to the slide during the talk, it is more efficient to record just the sound and use ffmpeg to combine the sound with the slide as still image.
pdfseparate and pdftoppm can be used to extract individual slides (pages) from the slide set and convert to bitmap graphics (png) so that ffmpeg can import it in a video.
synfic is software for animation, that is cartoons. I have used it only once, for a video in statistics and simulation. Making one short animation took several working days, and even with experience, I expect it to take more than one day.

My curent approach is to record one slide at a time. If I want to draw on the slide, I use avconv for the raw video recording, otherwise I use audacity for a pure sound recording. Video is recorded in high quality, so that different versions can be created later targeting different devices and bandwidth constraints. When all the raw files have been recorded, I splice everything together using avconv, including both pure audio with the appropriate slide in PNG format and video/audio clips from avconv, and while splicing everything is compressed and transcoded to a quality and format suitable for web delivery.

Hans Georg Schaathun / hasc@hials.no