Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

What free / non-restrictive open-source solutions (not GPL) are available for decoding game videos?

The requirements are simple:

  • a relatively easy to use C API
  • encoded files must be quite small
  • there must be an application that converts videos from any format (whatever codec is installed on Windows or equivalent amount of internally decoded formats)
  • decoding has to happen fairly quickly
  • bonus points go to file formats that are popular / actively supported and developed
share|improve this question
1  
Should it work on Windows, Windows Phone, Mac, Linux, Android, iPhone/iPad or something else? –  Roy T. Oct 26 '12 at 11:54
    
@RoyT. It's just decoding, so there shouldn't be any problems with platforms. But the main platform I currently work on is Windows (XP/Vista/7), if that's what you wanted to know. –  snake5 Oct 26 '12 at 12:24
    
Ah yes I indeed meant to ask on what platforms the movie should be viewable. –  Roy T. Oct 26 '12 at 12:43
add comment

1 Answer

up vote 5 down vote accepted

FFmpeg lets you decode all kinds of audio and video data thanks to libavcodec. Most of it is licensed under the LGPL, which allows commercial use, but some parts are under GPL, and some parts might infringe patents.

You might be able to avoid legal problems by using the free Ogg format (maintained by the Xiph.org foundation), probably with Vorbis+Theora for lossy compression. FFmpeg offers support for decoding those through libvorbis and libtheora, and will let you convert from any other format through the ffmpeg command-line tool.

share|improve this answer
    
I apologize for taking so long to accept the answer, I had to write a test app to learn more about how the system works and get basic video playback running on screen. If anyone's interested (it's very basic and doesn't cover a lot of things, including frame rates, seeking and error handling), it can be downloaded here: box.com/s/0qhpzsmhknjqewffoevm –  snake5 Dec 12 '12 at 9:57
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.