0

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}
3

I found the solution. The problem with the first youtube video is that I provided the short link to \includemedia. The URL in the media9 package seems to be the Long Link. So, in the MWE that I provided in the question, what is important in the first youtube url is the 11 character-case-sensitive VIDEO_ID#. Therefore, in the first youtube link, I have:

http://youtu.be/wKFRGVzrWgQ

which must be simply replaced by:

http://www.youtube.com/v/wKFRGVzrWgQ

So the complete working example is as follows:

\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://www.youtube.com/v/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}
\end{figure}
\end{document}

Now both youtube videos are playable with no problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.