1

When I run below code in my Linux system, there are some errors which I cannot understand where they come from.

Here is my code:

\documentclass{beamer}
\usepackage{media9}
\usepackage{graphicx}
\begin{document}
\begin{frame}{embed a movie}
\begin{center}
\includemedia[
    width=0.4\linewidth,height=0.3\linewidth,
    activate=pageopen,
    addresource=lowrey.flv,
    flashvars={
       source=lowrey.flv}
]{\includegraphics[height=0.3\linewidth]{}{VPlayer9.swf}
\end{center}
\end{frame}
\end{document}

And here are the errors:

File ended while scanning use of \frame.

No file document.nav.

Can anyone help me to solve the errors? They made me frustrated.

  • 1
    There is a opening brace before \includegraphics which isn't closed anywhere. – Ulrike Fischer Feb 3 at 15:56
  • 1
    Welcome to TeX.SE! {\includegraphics[height=0.3\linewidth]{}{VPlayer9.swf} cant be wright. Should it be {\includegraphics[height=0.3\linewidth]{VPlayer9.pdf}}? \includegraphics does not handle .swf, it handles images ... – Kurt Feb 3 at 15:57
  • 1
    Well, such video tutorials often contain errors. Better follow the documentation of used packages ... You can try {\includegraphics[height=0.3\linewidth]{example-image}}{VPlayer9.swf}} – Kurt Feb 3 at 16:18
3

I do not have your used file lowrey.flv but with using the standard file cube.mp4 from media9 package I can compile this code without errors:

\documentclass{beamer}
\usepackage{media9}
\usepackage{graphicx}
\begin{document}
\begin{frame}{embed a movie}
\begin{center}
\includemedia[%
    width=0.4\linewidth,height=0.3\linewidth,
    activate=pageopen,
    addresource=cube.mp4,
    flashvars={source=cube.mp4}
]{\includegraphics[height=0.3\linewidth]{cubeposter.png}}{VPlayer9.swf}% <=============
\end{center}
\end{frame}
\end{document}

Please see that I used the corrected line:

{\includegraphics[height=0.3\linewidth]{cubeposter.png}}{VPlayer9.swf}
  • your code can be compiled in my laptop, but doesn't show the movie! – Holger Mate Feb 4 at 13:40
  • it shows the poster and there is a part in which it is written: embed a movie – Holger Mate Feb 4 at 13:42
  • I am using Linux – Holger Mate Feb 4 at 14:47

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.