Did you ever find a simple program that can render a avi file from ffmpeg header to opengl cube or plane with sound ?
If someone do that and want to help me just post ....
Thanks...
Did you ever find a simple program that can render a avi file from ffmpeg header to opengl cube or plane with sound ?
If someone do that and want to help me just post ....
Thanks...
There is at least this nehe article:
http://nehe.gamedev.net/data/lessons....asp?lesson=35
There is Delphi source at the bottom.
Yes i know about this tutorial but it is based in the very old vfw.pas and it's not cross compiling....
That's why i mention about the ffmpeg library....
I found the headers for the ffmpeg library and is up to date... from the http://ultrastardx.sourceforge.net/ but is based in SDL ...
Well, basically it comes down to this line:
That is the only OpenGL related thing needed to know, rest comes down to getting the data out, frame by frame. I would imagine you don't need SDL for this at all, i guess SDL reads the data from the library same way. It would be unnecessary and step that would slow down the rendering.Code:glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 256, 256, 0, GL_RGB, GL_UNSIGNED_BYTE, data);
data is simply pointer to array containing R,G,B bytes per pixel. If you could for example draw a frame in given time to Bitmap/DIB you would be able to read the pixeldata. It's what the tutorial does.
Hm, I can imagine it is terribly slow for 1080p movies!
I've once talked to a guy who did a research on using mplayer front-end with his apps, maybe you could look into this further?
Bookmarks