Take the 2-minute tour ×
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.

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
\usepackage{multimedia}

\begin{document}

\begin{frame}
\movie[width=10cm,height=8cm]{blabla}{x_unknown.avi}
\end{frame}

\end{document}

This is the code with media9:

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

\begin{document}

\begin{frame}
\includemedia[
 width=10cm,height=8cm,
  addresource=x_unknown.FLV,
  flashvars={source=x_unknown.FLV}]{blabla}{VPlayer.swf}
\end{frame}

\end{document}

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

Thanks.

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

1 Answer 1

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

 
discard

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.