Graphics, Figures & TablesVideo in a Presentation

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
balure_1986a
Posts: 3
Joined: Tue Mar 04, 2014 9:02 am

Video in a Presentation

Post by balure_1986a »

I want to add a video in the frame (any video format, preferably AVI or FLV). How to add it in the frame? I have tried several things, but couldn't achieve it. There is no error while running the .tex file, but on clicking in video window, it says "cant open the Wildlife.avi file".

Is it the problem of acrobat reader or I am going somewhere wrong in writing the LaTeX syntax. Here is the sample code i tried to execute:

Code: Select all

\documentclass{beamer}
\usepackage{animate,media9,movie15}

\begin{document}

\begin{frame}
  \begin{figure}
%    \movie[width=3cm,height=3cm,poster]{}{Wildlife.wmv}
%    \animategraphics[controls,autoplay,loop,scale=0.5]{10}{Wildlife}{}{}
%    \includemovie[autoplay]{Wildlife.wmv}

  \includemovie[
    poster,
    autoplay,
    externalviewer,
    inline=false,
    text={\small(sample)}
  ]{6cm}{6cm}{Wildlife.avi}

%    \flashmovie{Wildlife.wmv}
  \end{figure}
\end{frame}

\end{document}
Last edited by localghost on Tue Mar 04, 2014 10:32 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

alex
Posts: 32
Joined: Mon May 19, 2008 10:53 am

Video in a Presentation

Post by alex »

A minimal example using the media9 package. Video files must be in FLV or H.264 (MP4) formats.

Code: Select all

\documentclass{beamer}
\usepackage{media9}

\begin{document}
\begin{frame}{Video example}

\includemedia[
    width=6cm,height=6cm,
    activate=pageopen,
    addresource=Wildlife.flv,
    flashvars={
        source=Wildlife.flv
       &autoPlay=true
    }
]{}{VPlayer.swf}

\end{frame}
\end{document}
Example with video files, it adds two buttons for choosing between the video files.

Code: Select all

\documentclass{beamer}
\usepackage{media9}

\begin{document}
\begin{frame}{Two videos example}

\includemedia[
    label=myVidPlayer,
    width=6cm,height=6cm,
    activate=pageopen,
    addresource=Wildlife.flv,
    addresource=Streetlife.flv,
    flashvars={
        source=Wildlife.flv %video to be shown at first
       &autoPlay=true
       &scaleMode=letterbox %useful, if videos are of different aspect ratio
    }
]{}{VPlayer.swf}

\mediabutton[mediacommand=myVidPlayer:setSource [(Wildlive.flv)]]{Wildlive}
\mediabutton[mediacommand=myVidPlayer:setSource [(Streetlive.flv)]]{Streetlive}

\end{frame}
\end{document}
Last edited by alex on Fri Mar 21, 2014 10:06 am, edited 1 time in total.
balure_1986a
Posts: 3
Joined: Tue Mar 04, 2014 9:02 am

Re: Video in a Presentation

Post by balure_1986a »

Thank you very much, it simply work with you code.
It really helped, thank you again.

If i want multiple videos playing in a single frame, then how do i do it?
Post Reply