0

I have been experimenting with the sample of code from LaTeX beamer presentation. At this point let me clarify that I know that this is a deprecated module and that I should be using media9 and not movie15, but I have spend 2 days trying to make it work with all these configurations but none of the sample of codes that I found online worked for me e.g. How to include multimedia files in beamer or Embedding Videos in LaTeX Beamer or Using media9 to include videos files or Video in a Presentation etc...etc...so I gave up on the idea and switched to the deprecated module.

Sample of working code from LaTeX beamer presentation slightly modified:

\documentclass{beamer}
\usepackage[3D]{movie15}
\usepackage[UKenglish]{babel}
\usepackage{lmodern}
% \usepackage{hyperref} % update based on comments
\usepackage{graphicx}

%% See: http://en.wikibooks.org/wiki/LaTeX/Presentations
%% See: http://www.hartwork.org/beamer-theme-matrix/
\usetheme{Copenhagen} 
\usecolortheme{beaver}

\hypersetup{
  pdfauthor={Thanos},
  pdftitle={Simple Beamer Class},
  pdfsubject={Subject},
  pdfkeywords={Key} {Words} {List},
  urlcolor=blue,
}
\author{Thanos} % updating based on comments

\begin{document}
\title{Simple Beamer Class}   
% \author{Thanos}
\date{\today} 
\frame{\titlepage} 
\frame{\frametitle{Table of contents}\tableofcontents} 

\section{Movie} 
\frame{\frametitle{Pymol Movie object}

\begin{figure}[!htb]
\centering
\includemovie[
poster,
toolbar, %same as `controls'
text={\includegraphics[width=0.8\textwidth]{samplePicture.eps}}
% text={\phantom{\includegraphics[width=0.8\textwidth]{samplePicture.eps}}} % update based on comments
]{10cm}{6cm}{SampleVideo.mp4}
\caption{A PyMOL movie object embedded in PDF, using mpg format.}
\label{mov:ex3d}
\end{figure}
}

\section{Lists}
\subsection{Lists I}
\frame{\frametitle{Unnumbered lists}
\begin{block}{My bloc}
test of bloc
\end{block}

\begin{itemize}
\item Introduction to  \LaTeX  
\item Beamer class
\end{itemize} 
}
\end{document}

My question is how to add a picture on the video. Based on the documentation of the package The movie15 Package page 6 shows that we can add a picture with the following part text={\phantom{\includegraphics[scale=2]{path/to/poster}}}.

After compiling the code is working and the video is playing but the picture is not displayed is there any workaround this problem?

A minor note to make here, I am also getting this error:

hyperref: Option 'pdfauthor' has already been used,

I searched online and I found this thread The \titlepage problem in beamer, the proposed solution did not work for me, or How to get rid of those beamer warnings, or Errors with Beamer not understandable. This is not something important I know this is only a warning but since I am asking the question why not trying to resolve all of my questions.

Update:

I forgot to include my Latex version:

$ pdflatex --version
pdfTeX 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian)
kpathsea version 6.2.3
Copyright 2017 Han The Thanh (pdfTeX) et al.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.29; using libpng 1.6.29
Compiled with zlib 1.2.8; using zlib 1.2.8
Compiled with poppler version 0.41.0

Update2

Adding video.log file, download here (video.log).

Update3

Sample of output based on comment (removing \phantom).

Output

Update4

Sample of code for package media9:

\listfiles
\documentclass{beamer}
\usepackage{media9}
\usepackage[UKenglish]{babel}
\usepackage{lmodern}
\usepackage{graphicx}

%% See: http://en.wikibooks.org/wiki/LaTeX/Presentations
%% See: http://www.hartwork.org/beamer-theme-matrix/
\usetheme{Copenhagen} 
\usecolortheme{beaver}

\hypersetup{
  pdfauthor={Thanos},
  pdftitle={This is the title},
  pdfsubject={Pdf Subject},
  pdfkeywords={Key} {Words} {List},
  urlcolor=blue,
}

\begin{document}

\title{Sample of media9 attempt}
\date{\today} 
\frame{\titlepage} 
\frame{\frametitle{Table of contents}\tableofcontents}  

\section{Movie} 
\frame{\frametitle{Movie using media9}

\begin{figure}[!htb]
\includemedia[
  %activate=onclick, % default
  addresource=sampleVideo.mp4,
  flashvars={
    source=sampleVideo.mp4
    &autoPlay=true % start playing on activation
    &loop=true
  },
  passcontext %show player's right-click menu
]{\includegraphics[height=0.45\linewidth]{samplePicture.eps}}{VPlayer9.swf}
\caption{A media9 package movie embedded in PDF, using mp4 format.}
\label{mov:ex3d}
\end{figure}
}
\end{document}

Adding video.log file, download here (videoMedia9.log).

Thanos
  • 1,133
  • 2
  • 10
  • 17
  • 1
    The warning - not error - hyperref: Option 'pdfauthor' has already been used is caused by using \author after \begin{document}. Use it before if you want to avoid the warning. – samcarter_is_at_topanswers.xyz Mar 21 '18 at 20:47
  • 1
    You don't need \usepackage{hyperref} \usepackage{graphicx} with beamer. – samcarter_is_at_topanswers.xyz Mar 21 '18 at 20:47
  • 1
    If you'd use \author etc. before \begin{document} you would not need \hypersetup{...} – samcarter_is_at_topanswers.xyz Mar 21 '18 at 20:50
  • 1
    Using [!htb] in a document class without floats does not make sense. Figures are centred by default in beamer, so \centering is unnecessary. – samcarter_is_at_topanswers.xyz Mar 21 '18 at 20:51
  • Back to your actual problem: can you please add the log file from your MWE? – samcarter_is_at_topanswers.xyz Mar 21 '18 at 20:53
  • @samcarter, Thanks for the comments see my update to the log file. – Thanos Mar 21 '18 at 21:41
  • Can you try without \phantom? – samcarter_is_at_topanswers.xyz Mar 21 '18 at 22:03
  • 1
    Why didn't you post a question about your media9-related problem? – AlexG Mar 22 '18 at 05:41
  • @samcarter I have update the code and also removed the \phantom see my update and also screen shot of the output now. – Thanos Mar 22 '18 at 09:51
  • @AlexG To be honest I read and tried so many, so many samples of working code that I end up believing that my latex version was the problem. I was running 2012 before, so I decide to update the version try again and again and nothing worked. So I gave up since everyone says that is working it does not work for my PC I guess. I can raise a question again but I do not know if it will work at the end or not. – Thanos Mar 22 '18 at 09:53
  • This may well be the reason for the failure. Did you try to install current TeXLive-2017 into your User directory? You can safely do this in parallel to the already intsalled but outdated system-wide installation If you adjust the PATH correctly. Which TeX installation do you use currently? – AlexG Mar 22 '18 at 10:02
  • I see from your post you are using TeXLive-2017 shipping with Debian. TL-2017 is frozen now (until TL-18 release). Can you try to update all installed packages to their last TL-17 version before freezing? – AlexG Mar 22 '18 at 10:07
  • @AlexG Thanks for the follow up. It looks my repo is up to date:

    $ tlmgr update --all (running on Debian, switching to user mode!) tlmgr: package repository http://mirrors.nic.cz/tex-archive/systems/texlive/tlnet (verified) tlmgr: no updates available

    – Thanos Mar 22 '18 at 10:17
  • 1
    Could you add the code example using media9 to your question? Put \listfiles on its top, run pdflatex and post the file list from the *.log as well. – AlexG Mar 22 '18 at 10:31
  • @AlexG, Thanks for the idea of \listfiles see the update. The pdf contains the picture but it does not play the video. So I am bit lost on why. This is why I switched to the movie15 package. – Thanos Mar 22 '18 at 11:07
  • Which PDF viewer do you use (You need Acrobat Reader for media9, sorry. On Linux there is no AR available anymore; you could try running AR for Windows inside Wine)? – AlexG Mar 22 '18 at 11:16
  • @AlexG, I assumed the same. In the past I used Okular with movie15 and still working fine. As you correctly identified I was still using it, so I was reading online why is not working so I download it the latest Acrobat for linux. No I am getting the error A 3D data parsing error has occurred. Trying to get more information on how to fix this problem. – Thanos Mar 22 '18 at 11:24
  • The last AR for Linux with embedded FlashPlayer was 9.4.1, After that Adobe dropped Flash support in AR f. Linux. Flash is needed for the video playback method that media9 implements. (Still being AR's standard.) – AlexG Mar 22 '18 at 11:31
  • @AlexG, I tried with Adobe 9.4.1, I am not getting the error but I am getting the error of not loading the video. I found an alternative solution with multimedia module. I will post complete code as an answer including all the findings so people in future can benefit. Thanks a lot for the analytical guide and follow up on my problem. – Thanos Mar 22 '18 at 14:47

1 Answers1

1

Based on AlexG guidance and expertise he helped me to understand that okular is not enough to play multimedia from media9. Proposed solution with Adobe Reader unix 9.4.1 unfortunately for me is not working.

Output of not loading the video from sample of code provided above with media9 package:

AdobeReader

So the only solution that worked for my simple requirements is to use \usepackage{multimedia}.

Sample of working code:

\documentclass{beamer}
\usepackage{graphicx}
\usepackage{multimedia}
\usepackage{lmodern}
% \usepackage[UKenglish]{babel}
% \usepackage{graphicx}

%% See: http://en.wikibooks.org/wiki/LaTeX/Presentations
%% See: http://www.hartwork.org/beamer-theme-matrix/
\usetheme{Copenhagen} 
\usecolortheme{beaver}

\hypersetup{
  pdfauthor={Thanos},
  pdftitle={This is the title},
  pdfsubject={Pdf Subject},
  pdfkeywords={Key} {Words} {List},
  urlcolor=blue,
}

\begin{document}
  \title{Sample of multimedia attempt}
  \date{\today}
  \frame{\titlepage}
  \frame{\frametitle{Table of contents}\tableofcontents}    

  \section{Movie} 
    \begin{frame}{Movie using media9}
      \begin{figure}[!htb]
        \movie[label=show3,%
               width=1.0\textwidth,%
               poster,%
               % autostart,%
               showcontrols,%
               % loop,%
              ]{\includegraphics[width=1.0\textwidth]
               {samplePicture.eps}}
               {sampleVideo.mp4}
        \caption{A media9 package movie embedded in PDF, using mp4 format.}
      \end{figure}
    \end{frame}
    \label{mov:show3}
\end{document}

Similar question that the solution has been accepted with media9 package Did anyone succeed in playing embedded movies inside Acrobat in Linux? maybe for someone else the sample of code might work.

Thanos
  • 1,133
  • 2
  • 10
  • 17
  • As for the media9 example, It seems there is an issue with the encoding of your SampleVideo.mp4. Could you try e. g. cube.mp4 coming with the media9 pkg instead? – AlexG Mar 22 '18 at 15:13
  • @AlexG Unfortunately same output. Hmmm this is getting strange, I followed the instructions from here (https://unix.stackexchange.com/questions/3505/how-to-install-adobe-acrobat-reader-in-debian) the installation looks correct.

    Any ideas?

    – Thanos Mar 22 '18 at 15:47
  • @AlexG I run the acroread from the terminal to see what is happening in the background. When the acroread starts I get:

    $ acroread videoMedia9.pdf Gtk-Message: Failed to load module "overlay-scrollbar" Gtk-Message: Failed to load module "unity-gtk-module"

    As soon as I press the play button on the pdf I get: (acroread:5712): Gdk-WARNING **: gdk_window_set_user_time called on non-toplevel.

    I tried to search online regarding the last error that seems to be related to my problem but unfortunately nothing related to Linux and Acrobat Reader together.

    – Thanos Mar 23 '18 at 09:37
  • Could you please put sampleVideo.mp4 into Dropbox (for testing, if you don't mind)? – AlexG Mar 23 '18 at 09:56
  • @AlexG, Sure I can share the demo video in Dropbox the file that I am using is open in public. You can download the file from here (http://www.sample-videos.com). I have chosen the smallest file, but feel free to test with any if you think that the size is important. Let me know if you require any further information. – Thanos Mar 23 '18 at 10:22
  • On my Linux box, AR-9.4.1 doesn't start at all, incompatible libraries perhaps. Did you try the documentation file media9.pdf? The examples on page 29 (and only these!) should work in AR-9.4.1. – AlexG Mar 23 '18 at 11:11
  • @AlexG You are right, it worked I was missing the Adobe Flash player. The problem is that there is no sound through this player. – Thanos Mar 23 '18 at 14:04