Archived

This topic is now archived and is closed to further replies.

skeitaridaudans

Movie playback

Recommended Posts

Hi, I''m programming a game in using glut & OpenGL and am wondering how I should go about playing back a movie file. For instance an intro or a cutscene or some stuff like that. If someone could point me to an article or some class library (C++) for doing that I would be pretty grateful. Thanks, Kári.

Share this post


Link to post
Share on other sites
Xsist10    122
that tutorial only covers converting movie pictures into textures. you can only handle low quality movies and no sound.

check in the file format archieves (somewhere in the tutorial section. or is it a site on gamedev (like nehe.gamedev.net)).

Share this post


Link to post
Share on other sites
mputters    126
There is no point in using OpenGL for rendering a fullscreen movie, just DirectShow or something similar will do. As for the cutscenes, they are simply scripted animations..

Share this post


Link to post
Share on other sites
Yes, exactly!
I have managed so far in this particular project to avoid DirectX and am also using glut for window and message handling so I would very much like to find something non-DirectX-related to do play back movie files ... not out of spite, just out of convenience.

Kári.

Share this post


Link to post
Share on other sites
superpig    1825
I''ve written stream-to-texture movie playback using OpenGL and DirectShow before. DirectShow is pretty much totally independent of the rest of DirectX; you lose your cross-platform compatability, but you gain automatic access to pretty much any codec installed on the user''s machine.

It was something like this: You create a custom filter which accepts raw image data, and then use glTexSubImage() to update your texture with that frame. (Use glTexSubImage rather than any other texturing functions, the others are way too slow. And make sure you turn off mipmaps through glTexParameter()).

IIRC, the custom filter stuff was in the DXSDK (the ''movie-tex'' example for D3D, though it may have been in the DirectShow kit somewhere).

Sound is a whole other ballgame, I didn''t touch it; but it should be possible, again, to write a custom filter to recieve it and feed it to your sound system.

Superpig
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.
Enginuity1 | Enginuity2 | Enginuity3

Share this post


Link to post
Share on other sites