8
\$\begingroup\$

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
\$\endgroup\$
  • 1
    \$\begingroup\$ Should it work on Windows, Windows Phone, Mac, Linux, Android, iPhone/iPad or something else? \$\endgroup\$ – Roy T. Oct 26 '12 at 11:54
  • \$\begingroup\$ @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. \$\endgroup\$ – snake5 Oct 26 '12 at 12:24
  • \$\begingroup\$ Ah yes I indeed meant to ask on what platforms the movie should be viewable. \$\endgroup\$ – Roy T. Oct 26 '12 at 12:43
5
\$\begingroup\$

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.

\$\endgroup\$
  • 1
    \$\begingroup\$ 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 \$\endgroup\$ – snake5 Dec 12 '12 at 9:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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