Animations with movie15 and swf files

I am trying to use movie15 to embed vector animations in my presentation. The trouble is that embedded SWF files refuse to display on Acrobat Reader X sometimes with a "This Media requires an additional player" message. Eg. this example file doesn't work. Animated GIFs won't display either, with no error message.

Maybe this is an Acrobat issue but I tried the flashmovie package with the same SWF files and that does work (but only with the embedded player option so no controls are visible). But flashmovie is supposedly unstable with beamer so I was wondering if someone had run into the same problem with movie15.

I am using Windows 7, Acrobat 10.1.2 and MiKTeX.

The replacement package is available on CTAN. It is called media9 and documented on CTAN.

Use the MiKTeX or TeXLive package managers for installation.

A simple example embedding an SWF would be

\documentclass{article}
\usepackage{media9}
%\usepackage[dvipdfmx]{media9} % only for latex->dvipdfmx

\begin{document}
\includemedia[
activate=pageopen,
width=200pt,height=150pt,
]{}{myexample.swf}
\end{document}


A minimal example for embedding a video file, using the video player component VPlayer.swf shipping with media9 and using the pdflatex, lualatex, latex-->dvips-->ps2pdf or latex->dvipdfmx/xelatex work-flows would be

\documentclass{article}
\usepackage{media9}
%\usepackage[dvipdfmx]{media9} % only for latex->dvipdfmx

\begin{document}

\includemedia[
activate=pageopen,
width=200pt,height=150pt,
flashvars={%
source=Sample.mp4% same path as in addresource!
%   &autoPlay=true%    % optional configuration
%   &loop=true%        % variables
}
]{}{VPlayer.swf}

\end{document}


Video files must be in the MP4 format. Videos in other formats must be converted to MP4, or recreated from the raw material. The H.264 codec gives high quality video at stunningly small file size. With ffmpeg, video files can be created easily.

From an existing video file, such as Sample.avi, re-encoded with 30 frames (entered on a single command line):

ffmpeg -i Sample.avi -vf scale="trunc(iw/2)*2:trunc(ih/2)*2"
-c:v libx264 -profile:v high -pix_fmt yuv420p
-g 30 -r 30 video.mp4


From a numbered sequence of bitmaps, such as frame-0.png, frame-1.png, ... :

ffmpeg -i frame-%d.png -vf scale="trunc(iw/2)*2:trunc(ih/2)*2"
-c:v libx264 -profile:v high -pix_fmt yuv420p
-g 30 -r 30 Sample.mp4

• Could you give MWE for inclusion avi movie? Should I use VPlayer.swf to play avi? Mar 27 '12 at 6:10
• Avi cannot be played by FlashPlayer. You should convert all your video files into MP4, preferably using the H.246 codec, or better recreate them from the raw material (numbered sequence of PNG/JPEG or uncompressed video). You can use VPlayer.swf as a video player or any other player available on the net. I recommend open-source StrobeMediaPlayback.swf from Adobe, hosted on SourceForge.net. Mar 28 '12 at 6:56
• Thank you! This helped. I used Nero Recode to convert my original avi to mp4. Mar 28 '12 at 16:29
• When I follow these instructions, it compiles but Acrobat spits a window with the message "A 3D data parsing error has occurred.". (Acrobat Reader 9.5.1 Linux, pdflatex from TeXLive 2013, media9 v0.7)
– alfC
Aug 18 '12 at 4:30
• I got same PDF error as alfC's above. Dec 11 '15 at 13:00