1

I followed the answer of this post to install media9 package. Then I followed this post to embed .mp4 in beamer. But I failed.

I included the package by:

\usepackage{media9}

and the related code is:

\begin{frame}
\begin{center}
\begin{figure}[ht]
   \movie[width=9.1cm,height=6.5cm,showcontrols=true,loop,poster,text={\small(Loading Video...)}]{}{video/kot_groupTrans_animation.mp4}
\end{figure}
\end{center}
\end{frame}

The following is the error output in latex:

! Undefined control sequence.\beamer@doifinframe ...\begin {figure}[ht] \movie[width=9.1cm,height=6.5cm,... \end{frame}

! Missing $ inserted.$ \end{frame}

Thank you, Pan

1
  • \movie is not a media9 command, but \includemedia is. See the examples in the media9 manual.
    – AlexG
    Feb 5 '15 at 7:50
5

otherwise, you can link to the file and use Présentation.app (see LaTeX integration section). you link to the file and the application will show the first frame of the movie and switch to a full screen movie player when you click on it. a minimal working example (provided you have a video named 720p25_pedestrian.mov next to the pdf generated by latex):

\documentclass{beamer}
\newcommand{\pdfmovie}[4]{\href{run:#1}{\framebox{\parbox[c][#3][c]{#2}{\center #4}}}}
\begin{document}
\begin{frame}
    \pdfmovie{720p25_pedestrian.mov}{6cm}{4cm}{H.264 avi}
\end{frame}
\end{document}
3
  • 1
    Welcome to TeX.SX! Could you elaborate a little bit on your answer? At the moment, it's more like a comment than an answer
    – user31729
    Jun 5 '15 at 15:07
  • added a minimal working example
    – rndblnch
    Jun 6 '15 at 15:54
  • This app is awesome! Thanks for the hint :)
    – ec-m
    Aug 9 '19 at 12:49
0

Like @rndblnch, I have found using the Présentation.app to be extremely helpful but, for video, I couldn't get both a link and a screen grab to work. So, I simply uncoupled the \href{run:my_movie.mov} command from loading the image and now have an image that fills most of the slide and an easy "Play clip" text link at the bottom that launches the movie player. See working example, below:

\begin{frame}
    \frametitle{Some title}
\center{
    % manually create screengrab and include image
    \includegraphics[width=.8\paperwidth,keepaspectratio]{video_screengrab.png}
    % link to play clip in Présentation.app
    \href{run:video_file.mov}{Play clip}
    }
\end{frame}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.