Hi Guys,

I'm currently underway developing an in-house 3D game engine for my studio here in Australia. I'm new to the gaming industry and obviously still an indie developer, though I've modded games for a couple of years now. However, I have quite a few years experience (4-5) in software development and server programming. I've started development on the engine (it's nothing too fancy) and integrated it with Lua, FMOD and Havok. However, I'm looking for a possibly free or free for non-commercial Video/Movie API/Engine. I realize technologies like Bink video would be the way to go, but we're trying to stick to the open source/free technologies. If you have any suggestions or pointers it would be greatly appreciated.

Thank you,
Tristan.

Dani AI

Generated

Nice thread. For an in-house engine like yours () there are two practical routes: embed a ready player that hides decoding and sync, or use a decoder library and push raw frames into your renderer for full control. 's Theora suggestion is a valid, royalty‑free option, but expect larger files and older compression compared with newer codecs.

Typical, robust workflow to implement yourself:

  • Run a dedicated decode thread that outputs timestamped frames into a small ring buffer.
  • Keep audio as the master clock (your FMOD integration can provide this) and present frames based on audio timestamps; drop late frames rather than stalling.
  • Convert decoder output (usually YUV420) to the GPU format either in a shader or during upload, then update a texture via PBOs/staging resources and render to a quad. Double‑buffer textures to avoid stalls.

Libraries and tradeoffs:

  • For maximal control: use FFmpeg (libavcodec) to decode and feed frames to your renderer (FFmpeg).
  • For a higher‑level, embeddable player with less plumbing: consider libVLC (libVLC) or a pipeline framework like GStreamer (GStreamer).
  • Use hardware decoding on each platform (Media Foundation/DirectShow/VideoToolbox/VA-API/VDPAU) where possible to save CPU and power.

Practical cautions: test on your lowest‑spec target early, measure CPU and texture upload cost, and confirm codec licensing if you plan commercial distribution (H.264/HEVC patent pools exist). If you need alpha channels for in‑game overlays, either use codecs/containers that support alpha or ship a separate alpha track or image sequence. If time is short, embed libVLC; if you need tight control and best runtime size/quality, decode with FFmpeg and stream frames into your renderer.

Recommended Answers

All 2 Replies

I use libvorbis with OpenAl so I immediately thought about Theora.
http://www.theora.org/downloads/

A quick google search also brought up this:
http://sourceforge.net/projects/libtheoraplayer/

It's open source and royalty free but I don't know how suitable it migth be for games.

Apparently, Ogre has a plugin, that could prove an interesting read:

Let us know what you end up doing and what your experiences are if you can. It might be pretty useful.

Thank you for that Isaac, was an interesting read! I have come across Theora before, but I'm talking ages ago. I'll download the libraries and do some initial tests and see how it performs! Video playback in games isn't necessarily process intensive anyway, as the game state is usually frozen during a cut-scene or introduction video. I guess where technologies like Bink take a leap forward is in their compression, since you don't really want to take up GB's worth of users space just for a few videos.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.