1

I gave a talk in which I 'paused' movies/animation using \only. When going to the next animation step, the first frame of the previous animation flashes for a split-second, 'destroying' the illusion of a pause...

I know that a MWE is expected, but struggle to find a way of providing fully self-contained code, since it would need to have access to the movie frames [1] to show the issue.

The idea is that I want to pause the movie for the listeners and continue it with stepping trough the presentation.

The relevant code at the moment is:

\begin{frame}
    \only<1>{%
        \animategraphics[autoplay]{24}{./video-0}{000}{150}%
    }%
    \only<2>{%
        \animategraphics[autoplay]{24}{./video-0}{150}{171}%
    }%
    \only<3>{%
        \animategraphics[autoplay]{24}{./video-0}{171}{300}%
    }%
\end{frame}

I also tried to autopause the animations which - according to the documentation of the animate package - should "Pause [the] animation when the page is closed, instead of stopping and rewinding it to the default frame.", but that didn't help.

Does anyone here more versed with animating frames see a possibility to avoid flashing the listeners of my talk with 'old' frames?

[1]: which are 300 single frames...

7
  • There is pkg mwe that provides example images. For the present case I suggest using the multipage file example-movie.pdf for making an MWE with \animategraphics and beamer. It provides 61 frames which should suffice.
    – AlexG
    Jun 30, 2022 at 10:15
  • Thanks for the pointer; for the moment I minimized the code online in this branch: github.com/habi/Talk.2022.MICResearchDay/tree/…
    – Habi
    Jun 30, 2022 at 10:19
  • Interesting: In Okular on Linux, there is no flashing back to the first frame. The transition to the subsequent part of the animation is smooth when going to the next page.
    – AlexG
    Jun 30, 2022 at 10:57
  • And the same in Acrobat Reader on a Windows Server (connected to with rdesktop).
    – AlexG
    Jun 30, 2022 at 11:00
  • Strangely, I also do not see the flashing issue when compiling the code and viewing the PDF on a Linux machine today. I did present the talk with Acrobat Reader on OSX yesterday, but said machine is at home at the moment, so I can only test it again tonight. It might boil down to an Acrobat Reader issue in the end...
    – Habi
    Jun 30, 2022 at 11:35

1 Answer 1

3

This might indeed depend on the device that the animation is run on.

Unfortunately, autopause is not effective anymore as soon as the animation has reached the end. The problem can be worked around by explicitly pausing the animation after the last frame. This prevents winding back to the start on page change. However this requires adding an animation timeline or using animateinline with a pausing \newframe*:

\documentclass{beamer}

\usepackage{animate}
%\graphicspath{{./images/VETSUISSE/HorseLimb/Limb02/frames/}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\zeropad#1#2{%
  \ifnum1#2<1#1
    \zeropad{#1}{0#2}%
  \else%
    #2%
  \fi%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\newcommand{\imheight}{0.618\paperheight}

\begin{frame}{Before Hoof}
\end{frame}

\begin{frame}
  \frametitle{Hoof}
    \only<1>{%
    \begin{animateinline}[autoplay]{24}
      \multiframe{151}{i=0+1}{\includegraphics[height=\imheight]{video-\zeropad{0000}{\i}}}%
      \newframe*
      \includegraphics[height=\imheight]{video-0150} % last frame needs to be repeated
    \end{animateinline}
    }%
    \only<2>{%
    \begin{animateinline}[autoplay]{24}
      \multiframe{22}{i=150+1}{\includegraphics[height=\imheight]{video-\zeropad{0000}{\i}}}%
      \newframe* 
      \includegraphics[height=\imheight]{video-0171} % last frame needs to be repeated
    \end{animateinline}
    }%
    \only<3>{%
    \animategraphics[autoplay,height=\imheight]{24}{video-}{0171}{0300}%
    }%
\end{frame}

\end{document}
2
  • NB: In order to repeat the three overlays it is necessary to go back to the slide before the first overlay by means of the Back key on the keyboard.
    – AlexG
    Jun 30, 2022 at 11:51
  • Thanks for looking into this in detail. Your workaround is quite elegant and I will employ it if I want to 'split' movies like this in future presentations.
    – Habi
    Jul 1, 2022 at 20:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .