There are a few question/answers regarding the embedding movies in PDF with pdflatex and special packages. However I find the information dispersed all around and confusing. And so far, in the best cases I get a "3D rendering error in Acrobat Reader" and I don't know what step is failing.
Maybe this particular case serves as guide for a step by step explanation:
- pdfTeX 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian), Acrobat Reader 9.5.1, Linux (Ubuntu 12.04). Need to upgrade something?
-
Let's start with a movie file:
movie.avi
with FFmpeg MPEG-4 encoding. Does it need to be encoded in some other way? what is the best tool to reencode? what encodings are going to work? Is a conversion toflv
format really necessary? -
pdflatex: what packages need to be included,
media9
,movie15
(obsolete?),flashmovie
? -
what is the latex command to include the movie? Can one have the option to keep the file inside the PDF or external?
-
How does one get the playback controls rendered with the movie inside the page? Does one really have to use a third party flash-based movie player? If so which player works with Acrobat 9.5.1?
-
Can I expect the movie to be player inside the PDF page in the monitor? Can one expect to have a preview of the movie (first frame) in the static rendering of the page.
-
Can one expect the resulting PDF and embedded movie to work when switching to Windows/Linux/OSX?
-
Does one need to change (hidden?) security preferences in Acrobat to see the movie?
A solution compatible with beamer
is also desirable.
Best Answer
movie15
.Re-encode for use with
media9
:ffmpeg -i movie.avi -sameq -vcodec libx264 -x264opts keyint=25 movie.mp4
orffmpeg -i movie.avi -sameq movie.flv
. Formovie15
there is probably no re-encoding required, but playback mileage may vary on different computers depending on installed media players and codecs.media9
ormovie15
.media9
andmovie15
physically embed media files into the PDF.movie15
allows for external files (optioninline=false
). Both allow for media loaded from URLs during runtime.For AR-9/X compatible media (
media9
), playback controls are provided by the media-player Flash-component being used (e. g.StrobeMediaPlayback.swf
or Youtube-URL). AR-9/X compatible media always need a Flash-based media player.Static images can be inserted with
\includegraphics{...}
as the next-to-last argument of\includemedia
(media9
) or withtext
option of\includemovie
(movie15
).media9
embeds Flash (SWF), sound (MP3), video (MP4/h.264, FLV) and 3D (PRC, U3D) with AR-9/X for Win and Mac compatibility. Linux AR-9 only supports embedded 3D. All media files are rendered by the AR built-in FlashPlayer or 3D renderer. Thus, above-mentioned media will reliably play on any Win and MacOSX box with AR-9 or X installed.movie15
embeds sound, video, Flash and 3D with AR-6/7/8 compatibility. Again, Linux version of AR only supports 3D. Okular, Evince support video playback on Linux. Note that all PDF viewers including AR on Win and Mac depend on third-party media players that must be installed on the host computer. Thus, media file formats and codecs that can be played back highly depend on the available players. The risk of failure is high, in particular in a conference/lecture situation on an unknown computer.media9
: no;movie15
: yes