Play a video file in c++

Started by
32 comments, last by MLillowitz 12 years ago
A quick scan of the sources shows it's using DirectDraw.

These are somewhat dated, but look at this example. The AviStreamOpenFromFile and friends, just replace the OGL call with DX equivalent.

It gives you frame-by-frame access. Decode each frame as a bitmap, blit it to surface/texture. You can even render on top of it if you wish.

Sound will likely be a problem, unless you want to muck around with sound buffers and frame skipping. I also don't recall which codecs are supported, so you might need to reencode the video.


A more up to date solution would be DirectShow, but that requires a few hundred lines of code just to set up render graphs and whatnot. It would definitely support everything, from video, audio, any codec, etc., but it's quite a chore to get going, with a bunch of COM incantations.
Advertisement
Allrighty, this looks promising.

I don't need sound in the video, so that I won't have issues with that.

Question: how much are Bink licenses? I see you have to email for a quote, so I'm sure it varies, but is it at all feasible for indie game devs?

It lists the prices on the website, but not on the Bink Video page (Click the 'Pricing' tab at the top) - slightly confusing. dry.png
Bink Video is $8500 (they also offer indie discounts when you email) per platform per product, with a discount per additional platform purchased.

"Pricing-wise, we charge on a per-product, per-platform basis. There are no royalties! Buying multiple platforms or multiple products at once will get you big discounts.


[color=#555749][font=Meiryo, Arial, Helvetica, Geneva, sans-serif]

We also have bulk licenses, per-site licenses, and per-publisher licenses available - you can email us if you are interested in one of these licenses.[/font]


[color=#555749][font=Meiryo, Arial, Helvetica, Geneva, sans-serif]

Also note that most publishers already have bulk licenses purchased, so if you are using a major publisher - email us, you might already have a license!"[/font]

Hi there.

You don't need to spend money to write a GUI that renders videos.

Please let me know if you need help on this.

- Mikey

This topic is closed to new replies.

Advertisement