3

Similar to this answer, I'm embedding a video in a TikZ environment. I've also enabled externalizing i.e. along with the main pdf, I get another pdf which just contains this tikz picture. Is it possible to embed this pdf in another beamer file, such that the video is played in the new file as well? If so, how can I do it?

MWE:

Figures.tex

\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{media9}
\usepackage{tikz}
\usetikzlibrary{shapes, arrows, positioning, calc, external}
\tikzexternalize[prefix=figures/]

% --------------------------- TikZ blocks - Start --------------------------------%
\tikzstyle{process} = [rectangle, rounded corners, minimum width=2.5cm, minimum height=1cm, text centered, text width=2cm, fill=orange!30]
\tikzstyle{arrow} = [thick,->,>=stealth]
% --------------------------- TikZ blocks - End --------------------------------%

\begin{document}
    \tikzsetnextfilename{Video_PDF}
    \begin{tikzpicture}[node distance=2cm]
        \draw [arrow] (-2,0) -- (2,0);
        \draw [arrow] (0,-2) -- (0,2);
        \node [align=center] at (3,0) {X-axis};
        \node [align=center] at (0,2.5) {Y-axis};
        \node at (1,1) {\includemedia[
        width=2cm,
        height=1.5cm,
        activate=pageopen,
        addresource=../../../videos/video1.mp4,
        flashvars={
        source=../../../videos/video1.mp4
        &autoPlay=true
        &loop=true
        },
        passcontext, transparent
        ]{}{VPlayer.swf}};
        \node at (-1,1) {\includegraphics[width=2cm]{../../../others/figures/powerpoint/Image2.png}};
        \node at (-1,-1) {\includegraphics[width=2cm]{../../../others/figures/powerpoint/Image3.png}};
        \node at (1,-1) {\includegraphics[width=2cm]{../../../others/figures/powerpoint/Image4.png}};
    \end{tikzpicture}
\end{document}

I tried embedding the pdf generated as an image and video, both didn't work

Main.tex:

\documentclass[t]{beamer}
\setbeamertemplate{caption}[numbered]
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{media9}
\usepackage{xcolor}

\begin{document}
    \begin{frame}
        \frametitle{Embedding as an image}
        \begin{center}
            \includegraphics[width=\linewidth]{./res/videos/Video_PDF.pdf}
        \end{center}
    \end{frame}
    
    \begin{frame}
        \frametitle{Embedding as a video}
        \begin{center}
            \includemedia[
                width=5cm,
                height=5cm,
                activate=pageopen,
                addresource=./res/videos/Video_PDF.pdf,
                flashvars={
                    source=./res/videos/Video_PDF.pdf
                    &autoPlay=true
                    &loop=true
                },
                passcontext,
                transparent,
            ]{}{VPlayer.swf}%
        \end{center}
    \end{frame}
\end{document}

In my Video_PDF.pdf file, I can see the video playing. But in my Main.tex file, video doesn't play. Where I embed the pdf as an image, the play button is visible in the place of the video along with other images. Where I embed the pdf as a video, nothing is visible.

2
  • 1
    All interactive elements in a PDF, be it ordinary links, layers, and not just embedded multimedia, get lost when embedding such a document into another document.
    – AlexG
    Jun 27, 2020 at 9:15
  • Okay. Thank you Jun 30, 2020 at 12:44

0

You must log in to answer this question.

Browse other questions tagged .