Jump to content


Video decoding


9 replies to this topic

#1 Hawkwind

    Member

  • Members
  • PipPip
  • 92 posts

Posted 21 February 2008 - 10:51 AM

Since Direct Show appears not to be in the current DX SDK.... what's the best way to play a video to a texture ?

#2 Vilem Otte

    Valued Member

  • Members
  • PipPipPip
  • 215 posts

Posted 21 February 2008 - 11:33 AM

http://nehe.gamedev....n.asp?lesson=35 here is something about loading AVI file into OpenGL texture, I hope you'd know how to load into DirectX texture...

#3 Hawkwind

    Member

  • Members
  • PipPip
  • 92 posts

Posted 21 February 2008 - 11:42 AM

Thanks. I'm actually looking for a video decoder that will decode straight to
a texture, since Direct Show USED to allow you to do this.

#4 Nils Pipenbrinck

    Senior Member

  • Members
  • PipPipPipPip
  • 597 posts

Posted 21 February 2008 - 06:27 PM

Have you tried theora yet? It's a free video-codec, comes with source and some example programs. That might be a good solution if you can decide which codec is used for video-playback.

Theora will not directly render into a texture, but neither will Direct Show. They just hide the details of the texture-upload and the YUV to RGB conversion for you.

I've used that library in several commercial games, and I was surprised that after the change I never again got a "video does not play on system xxxxx" issues from the QA testing.

Having a simple codec linked into the application can be a good thing!

Btw - if you find out that the performance of theora sucks in a visual studio build let me know. I have code-snapshot available that has all the SIMD-optimizations applied for MSVC.
My music: http://myspace.com/planetarchh <-- my music

My stuff: torus.untergrund.net <-- some diy electronic stuff and more.

#5 Hawkwind

    Member

  • Members
  • PipPip
  • 92 posts

Posted 22 February 2008 - 09:46 AM

Thanks again Nils! - I'll check this out (not heard of theora!). It's at work
and 'they' have decided that they want to render video to a model of a
screen at a sports stadium. And, like usual, they want it done yesterday....

#6 Goz

    Senior Member

  • Members
  • PipPipPipPip
  • 574 posts

Posted 23 February 2008 - 08:47 AM

Direct Show is in the platform SDK .. grab that and you can cary on using Direct Show ... you suffer a lack of portability though.

As for Theora ... I evaluated it recently ... if im honest i found it to be incredibly annoying in that it uses the ogg format to write files. Its a big shame that it doesn't use AVI (or, indeed, have the option to). As such i found it pretty useless for my means...

#7 CheshireCat

    New Member

  • Members
  • PipPip
  • 19 posts

Posted 23 February 2008 - 08:56 AM

We use Bink. It's not free though.

#8 Goz

    Senior Member

  • Members
  • PipPipPipPip
  • 574 posts

Posted 23 February 2008 - 09:00 AM

CheshireCat said:

We use Bink. It's not free though.

What do you think of Bink? I wasn't very impresed ... would rather use, and pay for, DivX myself ...

#9 CheshireCat

    New Member

  • Members
  • PipPip
  • 19 posts

Posted 23 February 2008 - 09:10 AM

For us it was pretty easy choice since it comes with UnrealEngine 3 integration, so we just had to license it, plug it in and voila - cross-platform video support in UE3. We haven't used it much yet though, but getting videos into the game (video textures) was dead easy. Haven't profiled the performance yet though.

#10 Nils Pipenbrinck

    Senior Member

  • Members
  • PipPipPipPip
  • 597 posts

Posted 24 February 2008 - 01:17 PM

The biggest advantages of BINK, Theora and other "self-contained" codecs is, that you can be dead sure that the codec is installed. If you try to playback a video with a codec that is not installed Win32 will try to install the codec. Better your application is not in fullscreen during this process.

The problem with this is: A fresh installed windows XP comes with a selection of codecs that are not suitable for todays bitrates and quality expectations. Before WindowsXP we always had Intel Indeo which was pretty good. But for some reason Microsoft decided to remove the only codec worth using from the default installation.
My music: http://myspace.com/planetarchh <-- my music

My stuff: torus.untergrund.net <-- some diy electronic stuff and more.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users