tags:

views:

467

answers:

3

Is there a good solution for playing a compressed video in OpenGL?

It needs to

  • Be cross-platform (Windows and MacOSX)
  • Render to a texture (preferably but not 100% needed)
  • Cost less than Bink

Any ideas?

+4  A: 

Qt can be used to render widgets (including a video player) in an OpenGL scene. It has a multimedia framework called phonon that can play video and audio.

See this demo video.

Qt is cross-platform and is now licensed under LGPL.

Karl Voigtland
Good answer, impressive demo, but our company is looking to avoid QT.
Kevin Laity
I know this question is old but : Why do you try to avoid Qt? Nothing prevents you to use it freely in commercial products since version 4.5 is published under LGPL.
esavard
+2  A: 

I recommend the Theora video format.
Here are the benefits:

  • Totally open, free and patent-unencoumbered specification
  • Free working library implementation (encoder/decoder) and source-code examples, available under a BSD-style license
  • Not too shabby documentation.
  • Portable

The decoder lets you decode to R'G'B', which can easily be uploaded with an OpenGL buffer object and fetched in a shader via a sampler.

Mads Elvheim
A: 

if you mean by solution that you can build/code it, i can suggest quicktime (easy on mac with cocoa, strange on windows but it works) or you can checkout mplayer/vlc sources and try to integrate that. there are a lot of demos about this on the web.

since you need cross platform, i guess gstreamer, video4linux and directshow are nothing for you. but there are video players that support different backends on different platforms - like openFrameworks

didito