TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am making a presentation with beamer and have problems embedding a video. When I use the multimedia package, Adobe Reader crashes, when I use the media9 package, it exceeds the memory capacity.

This is the code with multimedia:

\documentclass[transparent,dvips]{beamer}% if you use latex dvips ps2pdf




This is the code with media9:

\documentclass[transparent,dvips]{beamer}% if you use latex dvips ps2pdf




The FLV file is 15.8 MB Has anyone any experience with those problems and know how to fix it?


share|improve this question
Do you have same troubles when using pdflatex? – Igor Kotelnikov Aug 13 '12 at 16:22
Welcome to TeX.sx! We will need to be able to check the .avi in question, I think, to give any useful feedback. – Joseph Wright Aug 13 '12 at 16:38
Note that such a large video file may take a painfully long time to load during a presentation. This is due to the way AR decompresses the embedded media file and loads the FlashPlayer instance. – AlexG Aug 14 '12 at 7:29

Indeed, large media files may cause TeX to interrupt with error

! TeX capacity exceeded, sorry [main memory size=3000000].

when going the latex-->dvips-->ps2pdf route. While writing the DVI file, media files in the current page that are about to be embedded are kept in TeX's memory until shipping out of the readily typeset page. In case of large or many files, this may be more than TeX can cope with by default.

There are two options to handle such situations:

The first one is to increase TeX's main memory. You may follow the steps in the Bugs section of the animate package documentation. In TeXLive-2012, the maximum value that can be set is main_memory = 12435455.

If increasing TeX's main memory does not help, which very likely applies to your case, you will have to wait for the next CTAN/TeXLive update of media9 (v0.11). There, a package option bigfiles will be provided. It defers file embedding from the DVI producing to the PDF producing step. However, this requires that ps2pdf be called with option -dNOSAFER. Otherwise, ps2pdf aborts with error invalidfileaccess.

share|improve this answer
-dNOSAFER is no longer required (media9 v0.32, 2013-09-06) – AlexG Nov 11 '13 at 12:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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