I am trying to include a youtube video in my document. However, the video is not playable in the created PDF in Acrobat in Windows 7. Interestingly, the example in the media9
manual is played with no problem and I am using the same settings for another youtube video. The following is a MWE, where the first media is not playable (which is the one I want to include in my document) and the second one is the one which I found in the manual. Could someone shed light on this?
\documentclass[11pt,letterpaper]{article}
\usepackage{graphicx}
\usepackage{media9}
\begin{document}
The following youtube video is the one I want to include in the document.
\begin{figure}
\centering
\includemedia[
width=0.6\linewidth,height=0.3375\linewidth,
activate=pageopen,
flashvars={
modestbranding=1 % no YT logo in control bar
&autohide=1 % controlbar autohide
&showinfo=0 % no title and other info before start
&rel=0 % no related videos after end
}
]{}{http://youtu.be/wKFRGVzrWgQ}
\end{figure}
The following youtube video is adapted from media9 package manual.
\begin{figure}
\centering
\includemedia[
width=0.6\linewidth,height=0.3375\linewidth,
activate=pageopen,
flashvars={
modestbranding=1 % no YT logo in control bar
&autohide=1 % controlbar autohide
&showinfo=0 % no title and other info before start
&rel=0 % no related videos after end
}
]{}{http://www.youtube.com/v/w3f-WyDqOUw?rel=0}
\end{figure}
\end{document}
Best Answer
I found the solution. The problem with the first youtube video is that I provided the
short link
to\includemedia
. The URL in themedia9
package seems to be theLong Link
. So, in the MWE that I provided in the question, what is important in the first youtube url is the 11 character-case-sensitiveVIDEO_ID#
. Therefore, in the first youtube link, I have:which must be simply replaced by:
So the complete working example is as follows:
Now both youtube videos are playable with no problem.