PDA

View Full Version : library to load a video as a texture



Xemame
03-17-2010, 12:02 PM
Hello!

I'd like to use a video (avi, mpeg, etc) as a texture in opengl. Do you know a good lib I can use?

Besides, do you have an idea of the reasonable number of videos I can load simultaneously on a resonable computer, without being under the 30fps??? I read that the transfer of surface from the CPU memory to the GPU memory costs a lot of time!!! :(

Thanks!!!

martinsm
03-17-2010, 12:06 PM
I recommend Ogg Theora!
Here's nice library that will do lowlevel decoding for you: http://code.google.com/p/liboggplayer/
It also includes OpenGL renderer example that uses GLSL shader to accelerate yuv->rgb conversion.

ZbuffeR
03-17-2010, 01:23 PM
About the number of streams : it will depend of the resolution (standard or HD etc). Streaming texture data from CPU to GPU using async PBO is not that costly. I heard of a dozen simultaneous video streams around these forums.

Xemame
03-24-2010, 12:32 PM
@ ZbuffeR: thanks!

@ martinsm: liboggplayer seems very easy to use! Great! However, it only works with ogg videos, isn't it? I haven't see any documentation.