# How to add a picture on video using movie15 package or media9 or multimedia package(s) on LinuxOS

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}

\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). 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). • 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. – user36296 Mar 21 '18 at 20:47 • You don't need \usepackage{hyperref} \usepackage{graphicx} with beamer. – user36296 Mar 21 '18 at 20:47 • If you'd use \author etc. before \begin{document} you would not need \hypersetup{...} – user36296 Mar 21 '18 at 20:50 • Using [!htb] in a document class without floats does not make sense. Figures are centred by default in beamer, so \centering is unnecessary. – user36296 Mar 21 '18 at 20:51 • Why didn't you post a question about your media9-related problem? – AlexG Mar 22 '18 at 5:41 ## 1 Answer 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: 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. • 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 (unix.stackexchange.com/questions/3505/…) 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 9:37
• Could you please put sampleVideo.mp4` into Dropbox (for testing, if you don't mind)? – AlexG Mar 23 '18 at 9: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 (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