Hello Guest

Gif or video

  • 2 Replies
  • 5679 Views
Gif or video
« on: August 25, 2021, 16:32:45 »
Hello, I would like to know how to play a video or a gif with lwjgl ?

*

Offline kappa

  • *****
  • 1319
Re: Gif or video
« Reply #1 on: August 27, 2021, 20:11:21 »
Having look at the java bindings for either GStreamer or VLC might be a good starting place but you'll have to figure out how to hook them up to LWJGL (potential example).
« Last Edit: August 27, 2021, 20:12:52 by kappa »

Re: Gif or video
« Reply #2 on: September 28, 2021, 14:31:21 »
Hello, I would like to know how to play a video or a gif with lwjgl ?
I'm not sure about how to play video, but gifs can be played using by loading all frames from a GIF for example by either using this decoder or I think I saw there is a way to read GIFs using stb bindings. After all frames are loaded to separate textures (or frames are stored in memory and you update the data of the GL texture), you just bind them depending on animation time. It's probably not the best solution at all, but at least it works.