As many LaTeX users, I know that including a video in a Beamer PDF is a pain. The Internet is saying that easy, but I still got troubles with it (codec maze, etc).
In the past, I succeeded to include (and play) a video both on Linux (using multimedia) and Windows (using media9).
(OK, now it cannot reproduce this achievement since, AcrobatReader on Windows is no longer supporting Flash).
However, with these 2 solutions, videos are not really embedded in the PDF, only displayed inside thanks to readers.
To test this last assertion, after compilation, I change the location of my videos.
And, as expected, the PDF is no longer able to play them.
An alternative, is to split videos into images, and ask Beamer to animate these images into a video.
This option as the advantage to embed the videos and it is supposed to be Linux-Windows-friendly (not tested on Windows yet).
Now, I would like to go to the next level.
I would like to extend the working area of these methods.
Indeed, the multimedia approach is working in the "presentation" mode, but not in the "normal" mode of my PDF viewer.
While, the animate method is working in the "normal" mode but not in the "presentation" mode.
Since there is no intersection area, if I have a presentation that uses a combination of these 2 methods, I have to enter and exit "presentation" mode all the time... Super annoying and messy.
Thus, I would like to know if it is possible to play an animate video in "presenation" mode and/or play a multimedia video in "normal" mode ?
Here is a MWE:
\documentclass{beamer}
\usepackage{beamerthemeWarsaw}
\usepackage{graphicx}
\usepackage{multimedia} % for linux
\usepackage{media9} % for windows
\usepackage{animate} % for both ?
\begin{document}
\begin{frame}
\frametitle{Option A: linux only}
\movie[ % On linux with okular ++ poppler and phonon-backend-vlc installed
showcontrols=true, %
width=0.8\linewidth
]%
{\includegraphics[width=0.8\linewidth,draft]{./movie_snap.png}}
{./movie.avi}% or .mp4
With this option:
\begin{itemize}
\item I need to accept the "interactive forms",
\item I \textbf{cannot} play the video in "normal" mode: when I click nothing moves.
\item I can play the video in "presentation" mode.
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Option B: windows only}
\includemedia[% % Windows AcrobatReader >9.1
activate=pagevisible,%
deactivate=pageclose,%
addresource=./movie.mp4,%
flashvars={%
src=./movie.mp4 % same path as in addresource !
&autoPlay=true %
&loop=true %
&controlBarAutoHideTimeout=0 %
},%
width=0.8\linewidth %
]{\includegraphics[width=0.8\linewidth,draft]{./movie_snap.png}}{StrobeMediaPlayback.swf}
With this option:
\begin{itemize}
\item Is not working anymore, since Flash is no longer supported.
\item Any \textbf{replacement} ?
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Option C: linux and windows}
% \animategraphics[<options>]{<frame rate>}{<file basename>}{<first>}{<last>}
\animategraphics[width=0.8\linewidth,controls]{10}{./movie-}{001}{099}%.png
With this option:
\begin{itemize}
\item I need to accept the "interactive forms",
\item I can play the video in "normal" mode.
\item I \textbf{cannot} play the video in "presentation" mode: when I click on the control, it goes to the next slide.
\end{itemize}
\end{frame}
\end{document}
animateandmedia4svgpackages. See: https://tex.stackexchange.com/a/235180 and https://tex.stackexchange.com/a/595106 – AlexG Mar 14 '23 at 09:59