# Beamer animation fails to show first frame of animation when “poster” is included in \movie call

This is a follow up question on SE413129. Including movies in a beamer frame with the option "poster", as described on page 134 of the beamer guide does not result in frame 1 being shown. Some (unpredictable) frame is shown. Once the poster is clicked the animations plays as expected. A MWE developed under Debian Buster:

The following Octave script makes a sequence of images that show the frame number for each of 100 frames:

set(gcf,"position",[20,100,800,450]);
for kt=1:100
clf
text(0.,0.,strcat(int2str(kt)));
axis([-1 1 -1 1])
drawnow
fname=strcat('./jpg/img',num2str(kt,"%04i"),'.jpg');
eval(['print -djpeg "-S800,450" ' fname]);
end


The images are stitched together into an animation with

ffmpeg -f image2 -i img%04d.jpg -r 24  anim.mov


The animation can be viewed with ffplay anim.mov

A minimal beamer presentation is:

\documentclass{beamer}
\setbeamertemplate{navigation symbols}{}
\usepackage{multimedia}
\usepackage{graphicx}
\usetheme{Singapore}  % name of theme substituted here
\newcommand{\degree}{\ensuremath{^\circ}}
\begin{document}
%% example frame with animation
\begin{frame}
\frametitle{Numbers}
\movie[height = 0.6 \textwidth,width = 1.0\textwidth,poster]{}{anim.mov}
\end{frame}
\end{document}


This is compiled with

pdflatex anim.tex


When the resulting pdf is displayed (with okular or evince) the displayed frame is never frame 1, but some other frame. Once the displayed frame is clicked, the animations (starting with frame 1) runs as it should.

• Can you try to explicitly set the correct image? \movie[height = 0.6 \textwidth,width = 1.0\textwidth,poster]{\includegraphics[width=\textwidth]{img1}}{anim.mov} (or whatever the name of your first image is) – samcarter_is_at_topanswers.xyz May 1 '18 at 10:27
• @samcarter I replaced the "movie" line in the MWE with: \movie[height = 0.6 \textwidth,width = 1.0\textwidth,poster]{\includegraphics[width=\textwidth]{img0001.jpg}}{anim.mov}. I have verified that img0001.jpg does have the number 1 in the center of the image. However anim.pdf still shows the animation frame with number 3 or 4, as before – Clinton Winant May 1 '18 at 14:22
• can you make the movie and the images available somewhere? – samcarter_is_at_topanswers.xyz May 1 '18 at 14:37
• @samcarter I have uploaded the images and anim.mov onto my dropbox directory, my dropbox uname is clinton.winant@gmail.com, the files are in a directory called Beamer. I cant thank you enough for sticking through this with me. – Clinton Winant May 1 '18 at 15:46
• Do you happen to have a link to your dropbox folder (I don't use it myself, so I have no idea how to find something based on your user name) – samcarter_is_at_topanswers.xyz May 1 '18 at 16:00

## 1 Answer

As a workaround, you could manually set the image which should be shown as preview by using

\movie[height = 0.6 \textwidth,width = 1.0\textwidth]{\includegraphics[width=\textwidth]{img1}}{anim.mov}


(replace img1 with the name of the first image)

Drawback: as learned from the comment of Clinton Winant a short black screen is visible between the click and the start of the movie

As an alternative to the black screen, you could use media9 package - this shows a white screen :)

\documentclass{beamer}
\setbeamertemplate{navigation symbols}{}
\usepackage{media9}
%\usepackage{graphicx}
\usetheme{Singapore}  % name of theme substituted here
\newcommand{\degree}{\ensuremath{^\circ}}
\begin{document}
%% example frame with animation
\begin{frame}
\frametitle{Numbers}
%\movie[height = 0.6 \textwidth,width = 1.0\textwidth]{\includegraphics[width=\textwidth]{img0001}}{anim.mov}

\includemedia[
width=\linewidth,
totalheight=0.6 \textwidth,
%  activate=pageopen,
passcontext,  %show VPlayer's right-click menu
addresource=anim.mov,
flashvars={
%important: same path as in addresource'
source=anim.mov
}
]{\includegraphics[width=\textwidth]{img0001}}{VPlayer.swf}

\end{frame}
\end{document}
`