[Tex/LaTex] embed mp4 video in latex beamer on Mac OSX Yosemite

beamer

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

Best Answer

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}