I'm aware that it's possible to embed some kinds of videos and animations in LaTeX files (using the beamer or prosper classes) but I couldn't locate good documentation on this. My web searches returned a list of scattered forum questions and answers.

Could anybody give a link to some help or documentation page that systematically deals with the various ways of embedding videos and animations, the file types that work, etc.?


I'm personally only familiar with doing this in Beamer, which uses the multimedia package, distributed as part of Beamer itself. (Although it can be used in normal documents as well, independently from the rest of Beamer) The canonical reference on how to use the multimedia package is the Beamer user's guide, section 14.1, but basically it boils down to using the command

\movie[options]{placeholder box}{movie filename}

The placeholder box is some text or other content (could be an image, for example) that determines the size at which the multimedia file is shown.

The multimedia file can be shown either with an external viewer application, which launches when you click on the appropriate part of the PDF file, or directly in the PDF viewer itself. In both cases, though, this functionality is only supported by certain PDF viewers, mostly Adobe Reader. The file types it is able to display depend on the capabilities of the PDF viewer, or if using an external viewer, on which viewer program is being used.

A quick search on CTAN turns up a possible alternative, media9 (which supersedes the old movie15 package). According to the documentation, its main command is

\includemedia[options]{alt content}{media file}

and it seems to offer some of the same main features as Beamer's multimedia. However, I've never used this one myself so I can't say anything about it that isn't mentioned in the package documentation.

  • 3
    I've had good luck using the movie15 package, although it does seem to require Acrobat Reader to play the movies. Maybe some other viewers will work, but you definitely can't count on it in general. A nice feature is the ability to define a 'poster' image that takes the place of the movie when the movie is inactive. This way you can still have something meaningful on the slide if it turns out your viewer can't play the movie. – Michael Underwood Aug 12 '10 at 1:10
  • 1
    @Michael: The problem is that PDFs with embedded multimedia use Adobe's Rich Media extensions, which are not widely supported, to say the least. In fact, I don't know of any independent codecs for it, although Adobe do have a plugin that can be embedded in other software, and is embedded in MS Power-Point. – Charles Stewart Aug 12 '10 at 13:28
  • 4
    movie15 is deprecated and has been replaced by media9 (see the answer by @Peeter-Joot – meduz Jan 8 '13 at 20:21
  • 2
    Perhaps I'm the only one, but it took me a few error messages to realize multimedia is not automatically loaded by beamer, its distribution means notwithstanding. – user17829 Mar 12 '14 at 18:37
  • 2
    According to the Beamer documentation cited, this does not "embed" the video in the sense that it is included in the PDF file. It really just provides a link, and the video file needs to be present separately from the PDF. I need to submit a presentation to a conference, and apparently I am able to upload only one file, so this is not a satisfactory solution. Is there a way to truly embed the PDF, so I have a single file? – Liam Aug 21 '16 at 14:29

There's mention of the movie15 package in one of the other answers. This package has been replaced by the media9 package and is marked obsolete.

There's a nice example of how to use the media9 package here:

Animations with movie15 and swf files

Two other possibilities are beamer, and yt4pdf (for youtube videos), neither of which I've tried yet.

I've had mixed luck with the default player, VPlayer.swf when using the media9 package (it worked fine with the .avi's I used when trying movie15, but not so well on all the ffmpeg generated .mp4's required for media9). StrobeMediaPlayback.swf (recommended in the question above) appears to be more reliable. It also has some nice features like detachable player windows and fullscreen options.

  • Which were the symptoms of the failed attempts? yt4pdf wants Acrobat for producing the pdf. – AlexG Apr 2 '12 at 7:22
  • the pdflatex invokation goes without error, but of the four .mp4's that I tried, two show as only images, and the other two display correctly as video. I'm able to play the .mp4's with windows media player without trouble and generated all of them in the same way (using mathematica to generate .avi's and then ffmpeg to convert the .avi's to .mp4's). – Peeter Joot Apr 3 '12 at 3:30

I personally use hyperref package to start animations and movies during the presentation. This is the snippet of code from one of my Powerdot slides

\href{run:/usr/local/bin/mplayer -fs forced_pendulum.mp4}{

One caveat is that the code lunches MPlayer which plays video but the video is not "embedded" into the slide. I am guessing that I can fix that playing little bit with PSTricks code. In particularly animations done in the pure PostScript should not have any troubles running embedded. The upshot of my approach is that it should work on any class of LaTeX presentations and that doesn't require any particular PDF viewer (mupdf in my case) or any particular operating system for that matter.

  • 11
    That also requires the user to have mplayer installed to that specific location. Wouldn't calling the default player for that filetype be a better option? – Canageek Jul 24 '12 at 2:50
  • 5
    @Canageek absolutely correct observation. I used absolute path on my machine to "improve security". Executing scripts from PDF documents is not exactly the safest thing to do. I agree with you the above is the most simplistic solution and can be easily improved a lot. – Predrag Punosevac Jul 24 '12 at 21:25
  • 1
    Just to be clear, using the default player would look something like this: \href{run:./animation.avi}{\includegraphics{animation_thumbnail}} – Paul Wintz Aug 26 '20 at 11:54

The flashmovie package allows you to embed flash movies in pdfLaTeX documents. You need Acrobat Reader 9 to view the documents.


I recommend using

src=#3 % same path as in addresource!
&autoPlay=true % default: false; if =true, automatically starts playback after activation (see option ‘activation)’
&loop=true % if loop=true, media is played in a loop
&controlBarAutoHideTimeout=0 %  time span before auto-hide
}% end of the new command

in the preamble and

        \item blah
        \item blah

to produce a slide with a movie.

Background. I was used to the simplicity of movie15 but this was superseded by movie 9. This command provides with a "backward compatible" syntax with all the novelty of movie9.


One possibility is to use the animate package.

There is a nice pile of examples showing animate usage over on TeXample.

  • The "animate" link is broken. – Paul Wintz Aug 11 '20 at 9:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.