[OT] OpenML && video replay

Hi

I’m in need of a way to replay videos in a 3D environment. So I thought about OpenML. But as I see there are now implementations for the Win32 platform.
So what can I use until OpenML gets available? If possible I don’t want to switch to DirectShow. What are your suggestions how to handle videos best with OpenGL on a Win32 platform??

Bye
ScottManDeath

There’s two parts to video playback, the overlay programming, and frame decoding.

If you mean a 3D environment as in textured to some wall or video screen, then you can just decompress the frames into an RGB buffer and TexImage2D that one frame per frame - no need for overlays ? Maybe get fancy and hunt for a YUV extension…

If you want access to the codec to decompress the frames in the first place, that sounds like DirectShow/DirectMedia/DirectWhatever alright :\ If possible, you can maybe start with the simpler formats like basic RLE AVI or maybe Q3’s RoQ and grab source for a decoder somewhere ?..

this may help you:
http://www.thecodeproject.com/audio/framegrabber.asp http://www.flipcode.com/tutorials/tut_dshow01.shtml http://www.flipcode.com/tutorials/tut_dshow02.shtml http://www.flipcode.com/tutorials/tut_dshow03.shtml

or try
http://www.mpeg.org

they provide a sourcecode for a mpeg decoder…

[This message has been edited by AdrianD (edited 08-01-2002).]

The fastest way to display Video as a texture (without having to reload the texture all the time) is with glTexSubImage2D() - Redbook p.367

Hi

Thank you for the hints. I just have downloaded the DX8.1 SDK. I think I will look throught the files on flipcode and codeproject.

To be more concrete: I have a LED display on the parallel port and there I can display 7 bit monochrome and 4 bit palette indexed images. I would like to show there videos. I don’t need high frame rates , just 10-15 will be enough.The frames beeing to mucgh would simply be skipped. It would be nice if I could preprocess(scale) and reduce the color before I display them. OpenGL would be used to display text and lines into the video.After that I would read back the frame buffer and display it.Perhaps when the basic functionality is given there it would be nice to use a web cam as video source. So I think DirectShow with some self made filters will be the way I’ll go.

Bye
ScottManDeath

~The fastest way to display Video as a texture (without having to reload the texture all the time) is with glTexSubImage2D() - Redbook p.367~

Out of curiosity – if the image to be updated matches the original glTexImage2D dimensions (eg, RoQ frames are a power of 2), is it still recommended to use SubImage ? I would hope the driver can detect that the dimensions and internal format are the same and this is indeed a data update, not a recreated texture object ? – in which case performance of Image and SubImage is comparable.

AFAIK - using gltexSubImage does not involve re-creating a texture object - and is just a data update - as i can get from it - SubImage allows use of data that can change - whereas glTexture2d and glBindTexture “fixes” the memory so update is not possible unless you call glTexture2d again… correct me if i’m wrong however