You are on page 1of 3

beamer - Animation in PDF presentations, without Adobe Reader?

- TeX - LaTeX Stack Exchange 26/01/18 10(12

Animation in PDF presentations, without Adobe Reader?

I sometimes have to present on other people's equipment, such as machines running stripped down Linux distributions,
presentation servers with a bare-bones PDF viewer running in a virtual machine, or a Windows box with a heavily locked-down
Adobe Reader (e.g. with JavaScript disabled). So far I've tried to avoid doing anything fancy with beamer . But for some concepts,
animations seem necessary.

How can one create PDF presentations in LaTeX, preferably with beamer , which include animations that work on most PDF
viewers?

Ideally, if the animations don't work then they should degrade gracefully. For instance, the first and last frame could still be
shown.

Beamer has \animate but this requires the PDF viewer to support showing several slides in succession, without manual
intervention. Jens Nöckel suggests using external movies, which seems even less likely to work; this relies on a viewer being
available for the movie format, and that the movie viewer can be called by the PDF viewer.

Older documents suggest MetaPost or animated GIF files, which seem hacky (though I will consider them if no other alternatives
exist).

Please discuss only one main approach per answer.

{beamer} {animations} {movie15}

edited Apr 8 '11 at 12:08 community wiki


3 revs, 2 users 100%
András Salamon

5 Out of curiosity: what PDF viewers except Adobe Reader are able to show animated GIFs or MetaPost? I
might be mistaken but as far as I know, the answer is “none”, and your quest is hopeless. –
Konrad Rudolph Jul 28 '10 at 8:19

1 What happened to the old answers to this question? – Will Robertson Jul 28 '10 at 8:28

@Konrad: For Windows, Adobe made an Active-X control which is embedded in Office. I guess you can
watch them in Power Point. – Charles Stewart Jul 28 '10 at 10:31

@Charles: granted, but I guess that does’t solve this problem since this is actually the same component
that’s used in Adobe Reader so if the AX control is installed chances are, so is Adobe Reader. –
Konrad Rudolph Jul 28 '10 at 10:43

2 @András: movie15 requires not only Adobe Reader, but also an external media player and Windows.
Package animate only needs Adobe Reader. – AlexG Apr 8 '11 at 12:19

4 Answers

As discussed in https://stackoverflow.com/questions/2428372/insert-video-clip-in-
a-lyx-presentation-and-play-it-in-gnu-linux, you can use the multimedia package to
embed movies (mpg, mp4) in a way that you can play them in Okular. Minimal
example:

\documentclass{article}
\usepackage{multimedia}
\begin{document}
\movie[height = 0.6 \textwidth,width = 1.0 \textwidth]{}{animation.mpg}
\end{document}

edited May 23 '17 at 12:39 community wiki

https://tex.stackexchange.com/questions/429/animation-in-pdf-presentations-without-adobe-reader Página 1 de 3
beamer - Animation in PDF presentations, without Adobe Reader? - TeX - LaTeX Stack Exchange 26/01/18 10(12

2 revs
Turion

2 +1! the only solution that worked with me so far! thanks! – smihael Jan 27 '13 at 14:42

2 Good answer. This works with Okular but sadly not with impressive :( – Gabriel Feb 7 '13 at 0:08

That's probably because impressive still relies on the antique Xpdf. Maybe you can ask the developer
team to write a backend for the more advanced Poppler and they might be able to implement movie
embedding easily. – Turion Feb 8 '13 at 17:43

With TeX Live 2015 and Okular Version 0.24.2 this solution does not work. There are no compilation
errors, but Okular only displays a blank space. – Luís de Sousa Mar 24 '17 at 13:22

@LuisdeSousa, both are outdated. It should work with up to date TeX Live and Okular. – Turion Mar 24
'17 at 14:14

The movie15 package allows you to set graphics or text, including the first frame of
the movie, to display if the movie is inactive. This can be achieved with the text and
poster options (taken directly from the documentation):

\includemovie[
text={\includegraphics[scale=2]{path/to/poster}}
]{}{}{path/to/movie}

will display the image specified by path/to/poster , scaled to twice its size, and

\includemovie[
poster,
text={\phantom{\includegraphics[scale=2]{path/to/poster}}}
]{}{}{path/to/movie}

will display the first frame of the movie, and make it the size of the scaled
path/to/poster .

This obviously doesn't make the included movie playable in any more locations than it
otherwise would be, but it does make it more elegant when playback is unavailable.

answered Jul 28 '10 at 18:59 community wiki


Michael Underwood

9 Quick comment that movie15 has been superseded by media9, after this answer was posted. –
Ioannis Filippidis Aug 8 '13 at 6:56

The easiest way to produce animations from image sequences (pdf, mps [metapost],
jpeg, png, jb2 with pdflatex; ps/eps, mps with latex) or inline images (pstricks, tikz)
is to use the animate package. Depending on the option settings, poster=first or
poster=last, bare-bone viewers without JavaScript, such as Xpdf, GV or GSview will
display the corresponding animation frame. For playback, however, Adobe Reader is
indispensable. Animated Gif must be split into png or eps sequence before
embedding, because it is not supported by the PDF specification.

http://www.ctan.org/tex-archive/macros/latex/contrib/animate/animate.pdf

edited Apr 8 '11 at 12:12 community wiki


2 revs, 2 users 92%
Alexander

This is a somewhat different approach to rendering animations or movies in Linux


Latex Beamer presentations:

https://tex.stackexchange.com/questions/429/animation-in-pdf-presentations-without-adobe-reader Página 2 de 3
beamer - Animation in PDF presentations, without Adobe Reader? - TeX - LaTeX Stack Exchange 26/01/18 10(12

Firstly I use Kazam to convert any animations into more compressed mp4
Secondly, I use \href{run:./directory/file.mp4}{MOVIE} in Latex/Lyx to generate the
link within a pdf file.
Thirdly I use mpv as a media player.

Its config file in /etc/mpv/mpv.conf has just the one line: use-filedir-conf. Then, one
can set in the beamer presentation directory a file called mpv.conf with lines such as
this:

screen=1
geometry=60%+380+80

The screen=1 allows the file.mp4 to played on the extended desktop such as the
projector.
The geometry= line allows one to set the magnification and the position of the
window in which the movie will be rendered.

More details can be found in the mpv manual.

Finally, I use Impressive to render the pdf. Altogether a very pleasant way of saying
goodbye to acroread and Adobe.

edited Dec 1 '15 at 13:33 community wiki


3 revs, 3 users 65%
user2004198

https://tex.stackexchange.com/questions/429/animation-in-pdf-presentations-without-adobe-reader Página 3 de 3

You might also like