[Tex/LaTex] Trying to embed mp4 in a Beamer presentation

beamerdimension-expressionsmedia9

Sample document

\documentclass{beamer}
\usetheme{Amsterdam}
\usepackage{media9}

\title{TITLE}
\author{AUTHOR}
\institute{INSTITUTE}
\date{DATE}

\begin{document}

 \addtocounter{framenumber}{1}
 \frame{\titlepage}

 \begin{frame}{Title}
 \includemedia[
  width=\paperwidth,
  height=0.7\linewidth,
   activate=pageopen,
 addresource=C:/Users/David/Desktop/NF/1.mp4,
 flashvars={source=C:/Users/David/Desktop/NF/1.mp4
 &loop=true
 &scaleMode=letterbox
    }
 ]{}{VPlayer.swf}
 \end{frame}

\end{document}

I know this has already been asked. So please before anyone just gets rid of this question, hear me out. I have updated, uninstalled and re-installed MiKTeX2.9 and TeXnicCenter. Hence I do not believe this is an "update packages" fix. I am trying to use the Media9 package to embed a video. (The file format is not relevant I have mp4, avi, & swf of the same video.) I'm a master's student in Mathematics so I use TeX frequently and I've never had such an issue. Every time I compile I get this error

You can't use '\dimexpr' in restricted horizontal mode.
<argument> \dimexpr

line 1.28 \end{frame}

So my first question is what is this error? Why does it occur and of course how can I resolve it? I read one previously removed question that suggested an update. However, I have tried this. Can anyone suggest something? Am I doing something stupid? I'm not even sure where this "dimension expression" is being used.

Best Answer

\documentclass{beamer}
\usetheme{Dresden}
\usepackage{graphicx} 
\graphicspath{C:/Users/David/Desktop/NF} 
\usepackage{media9}
\addmediapath{C:/Users/David/Desktop/NF}

\title{TITLE}
\author{AUTHOR}
\institute{INSTITUTE}
\date{DATE}

\begin{document}

 \begin{center}
 \includemedia[
 activate=onclick,
 width=0.75\textwidth
 ]{\includegraphics{Pic.png}}{1.swf}
 \end{center}

\end{document}

Here is progress update. Something very weird that I do not understand. I was able to get the video to embed and play using the above code. However, there is still a caveat... I get the same error about \dimexpr along with 23 other errors. If anyone has any suggestions/workarounds I would be very grateful, thank you in advance.