info-beamer

Displaying GIF files

#1

You can’t use GIF files. info-beamer only supports PNG and JPEG files. GIF files would probably be too slow, since the decoding would have to happen in software.

But you can still show short animated looping clips by just converting your GIF file to an H264 video and use info-beamer to seamlessly loop that file. You get hardware decoded playback that way.

First convert your GIF file (for example using ffmpeg):

$ ffmpeg -f gif -i infile.gif -pix_fmt yuv420p outfile.mp4

You can then use the resulting video. In Lua code this might work like this:

gl.setup(NATIVE_WIDTH, NATIVE_HEIGHT)

local vid = resource.load_video{
    file = "outfile.mp4",
    looped = true, -- for true GIF feelings
}

function node.render()
   -- you might want to change those values to match your video's size
    vid:draw(100, 100, 400, 300)
end