AnswerBun.com

How do I include a local GIF image into beamer using media9 package

TeX - LaTeX Asked by Huy Nguyen on December 15, 2020

From this question, there is a way to include images with a hyperlink using the media9 package included in TeXLive. I am trying to include a GIF image (supported directly by the media9 package) in a beamer slide:

    begin{frame}
        frametitle{Motivation from photography}
            includemedia[
            width=0.3linewidth,keepaspectratio,
            activate=onclick,
            %addresource=config.xml, %embedded configuration
            addresource=../../../../Documents/Horse_galloping.gif, %embedded image file
            %flashvars={xml=config.xml},
            %passcontext %show the player’s context menu
            ]{}{StrobeMediaPlayback.swf}
    end{frame}

I still have some trouble: my tex file compiled successfully but when I opened the pdf file (adobe reader; Foxit doesn’t show the gif image) and clicked on the window, it showed the following error: “we are unable to connect to the content you’ve requested. We apologize for the inconvenience” (TypeError – Error#1009). Some background: I compiled with pdflatex-biber-pdflatex-pdflatex sequence. I called the media9 package by

usepackage{media9}

One Answer

I've been trying to use GIF images with media9 as well without success. In the end, I was able to include the animation using an MP4 video instead. Turning a GIF into an MP4 is easy, you can use kdenlive for this. Once you have the MP4 file, you can include the animation as follows:

begin{frame}
includemedia[
    width=.3linewidth,
    height=.3linewidth,
    addresource=../../../../Documents/Horse_galloping.gif,
    transparent,
    activate=pageopen,
    passcontext,
    flashvars={
        source=../../../../Documents/Horse_galloping.gif
        &loop=true
    }
]{}{VPlayer.swf}
end{frame}

Not the best solution, but it works. On the bright side, the MP4 file uses less space than the actual GIF, which is a plus.

Answered by gvegayon on December 15, 2020

Add your own answers!

Related Questions

TikZ nested text boxes margins

4  Asked on November 9, 2021

 

Aligning Equation with cases

2  Asked on November 9, 2021

 

Draw a figure with text in Tikz

1  Asked on November 6, 2021 by oldenios

 

Problems creating PDFs for professional print

1  Asked on November 6, 2021 by olsn

 

How to create these plots?

3  Asked on November 6, 2021 by kileuskas

   

Incorrect bar graph formatting in TeX

1  Asked on November 6, 2021 by egor-stoyan

     

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP