[Tex/LaTex] Read video (mp4) with beamer on Windows with the multimedia package

beamermedia9multimediavideowindows

I am using beamer on Windows 10, and I want my mp4 video to be read using the multimedia package (I do not want media9 since I have multiple videos and the final pdf file is way too heavy in the end). Despite the multiple topics on related issues, I found no answer to this specific problem.

I have no compilation error, my video is in the correct folder. The pdf is created successfully. But in the pdf file, using the latest Adobe Reader version (2019.012.20036), it does not show the video, only a blank. If I click on the place where the video is supposed to be, I get a contour of it, but nothing with right-click. Any idea what is the problem? Here is the piece of code within one frame :

\movie[height=0.5625\textwidth, width=1.0\textwidth,
    poster, autostart]{}{video.mp4}

Additional information 1 : I also work on Linux and the same piece of code (with the same mp4 video and using also multimedia) works perfectly. I mean that once the pdf is created, I open it with Okular, and the video starts directly. So the same code works on Linux (16.04), but does not work on Windows.

Additional information 2 : I nevertheless tried media9 to investigate this issue on Windows, with the same mp4 video. The video this time appears on the slide, but for some reason, does not start directly when I arrive on the slide, despite the pageopen command. Here is the corresponding code:

\includemedia[width=1.0\textwidth, height=0.5625\textwidth,
    activate=pageopen, passcontext, transparent, addresource=hexapod.mp4, 
    flashvars={source=hexapod.mp4}]{}{VPlayer9.swf}

Best Answer

  1. The \movie... command from package multimedia implements the "Movie Annotation", an old standard from the PDF specification. In Acrobat Reader only very old video formats are supported: some QuickTime *.mov and *.avi with the "MS Video 1" codec. While MP4 may be playable in Linux Okular, this file format is not supported by Acrobat Reader and the PDF specification.

  2. media9: For starting playback automatically, the Flash variable autoPlay must be set as well. Option activate=pageopen just tells the PDF viewer to initialise FlashPlayer and to load the video player app VPLayer.swf on page-open.

The following minimal example with media9, FlashVar autoPlay and example files from the mwe package works for me. Newest versions of Acrobat Reader, FlashPlayer, media9 installed:

\documentclass{beamer}
\usepackage{media9}
\usepackage{graphicx}

\begin{document}

\begin{frame}{Blank page}
  Go ahead!
\end{frame}

\begin{frame}{Video autoplay}
  \begin{center}
    \includemedia[
      width=0.5\linewidth,
      activate=pageopen,
      addresource=example-movie.mp4,
      flashvars={
         source=example-movie.mp4
        &autoPlay=true
      },
      passcontext, % enable VPlayer's right-click menue
    ]{\includegraphics{example-movie}}{VPlayer.swf}%
  \end{center}
\end{frame}

\end{document}

For information about using media9 with separate (not embedded) media files, see: https://tex.stackexchange.com/a/73039

Related Question