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.
Best Answer
Indeed, large media files may cause TeX to interrupt with error
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 ismain_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 optionbigfiles
will be provided. It defers file embedding from the DVI producing to the PDF producing step. However, this requires thatps2pdf
be called with option-dNOSAFER
. Otherwise,ps2pdf
aborts with errorinvalidfileaccess
.