I just read the documentation for media9
but was not able to identify what I am doing wrong. The videos in the documentation all play fine in my installation of Adobe Acrobat Pro. When I compile the example below, the slide has a box for the video that says "(click to play)" but when I click, all I see is white.
\documentclass{beamer}
\usepackage{media9}
\begin{document}
\begin{frame}{}
\includemedia[width=0.6\textwidth,height=0.45\textwidth]{(click to play)}{4x167_h5_k010.mpg}
\end{frame}
\end{document}
Here is a link to the mpg file I am including. I am actually not sure the aspect ratio of the video. In addition to even showing up and playing, I am also interested to know the following
- Do I have to specify both the
width
andheight
? I would rather specify the width and that it maintain the same aspect ratio. - How do I get it to loop (I saw info in the documentation about this, just wanted to get it the play first)?
(I also tried the movie15
package and that gives a box that is all black)
Best Answer
Thanks to @AlexG for directing me to his solution for a closely related question. On closer review, there is no option to include mpg videos in
movie15
. This functionality has been deprecated together withmedia9
. The newer package only accepts the more compressed, mp4 format.I used
ffmpeg
to convert my mpg file to an mp4 file with the command:As a note,
ffmpeg
would not do the conversion until I had a standard aspect ratio. I had created the video using theMovie Maker
extension of VMD. To obtain a 3x4 aspect ratio, I used the commanddisplay resize 1280 960
, then regenerated the mpg video file.Here is the final working example (with the video loop command):