Results 1 to 5 of 5

Thread: render a avi file from ffmpeg header to opengl with sound

  1. #1

    render a avi file from ffmpeg header to opengl with sound

    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...

  2. #2
    There is at least this nehe article:
    http://nehe.gamedev.net/data/lessons....asp?lesson=35
    There is Delphi source at the bottom.

  3. #3
    Quote Originally Posted by User137 View Post
    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 ...

  4. #4
    Well, basically it comes down to this line:
    Code:
    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 256, 256, 0, GL_RGB, GL_UNSIGNED_BYTE, data);
    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.

    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.

  5. #5
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •