Beamer, movies and Linux

tl;dr: On a stock Ubuntu 16.04. system build your presentation with pdfLaTeX or LuaTeX and use Okular to display it.

TikZ animations are a great way to illustrate dynamic processes in your Beamer presentations but are not suited for movies. So far, presenting movies on Linux has been pretty dull but eventually I figured out what works (and what not). First of all you, need to include

\usepackage{multimedia}

in your preamble which gives you the \movie command in order to include a reference to the movie file and a placeholder text/image/whatever that is shown as long as the movie is not played:

\movie[width=9.6cm, height=5.4cm]{
 \includegraphics[width=9.6cm, height=5.4cm]{still}
}{movie.wmv}

In most cases, the first frame of the movie would be a good canditate as a placeholder. To get the first frame you could use ffmpeg:

ffmpeg -i movie.wmv -vframes 1 -f image2 foo.jpg

Now, the first hurdle is to compile the presentation and unfortunately you will find out that XeTeX does not work with the multimedia package. So, either compile with LuaTeX if you want to use system fonts or compile with regular old pdfLaTeX.

To display your presentation you could use Evince but it will display the animation only in windowed mode, in the presentation mode nothing happens for me. KDE’s Okular has no such limitation and works fine with a PDF containing a movie. Note though that the movies are not baked into PDF but linked to. This means, you must deliver all files side-by-side.


Discussion