Easiest way to play video with SDL ?

Started by
5 comments, last by pjcast 18 years, 2 months ago
Hi, I want to play a compressed video file in my SDL code, anything but MPEG. I've searched to the end of the world wide web, but I didn't find anything. I read something about MPlayer, VLCPlayer and using OpenGl. But I want some code that I can steel. =) I'm making a game with SDL and I just want to play a small video file! Help!
Advertisement
SMPEG, SDL MPEG Player Library made by Loki


HTH :-)
Doesn't SMPEG only support mpeg files?
Take a look at this thread.
Drew put together a great guide on playing video files with SMPEG in SDL not too long: Playing Video Files with SMPEG.
Rob Loach [Website] [Projects] [Contact]
But doesn't SMPEG only support mpeg/mpg files?

I want to play compressed video files, such as AVI, WMV....
AVI files can contan mpeg streams. And mpeg/mpg are compressed anyway. Just note, unless you are using DirectShow, you will more than likely be including a software codec that may (or may not need royalties).

The best non-royalty codec (possibly patent encumberred though) is the xvid codec. The best non-royalty, and no patent worry is currently libTheora (check out theora.org) - the demo included actually uses SDL to play video on windows and linux. There is a Java port of Theora/Ogg/Vorbis (the jOgg, jVorbis, jTheora) and a C# port of theora that i ported from the jTheora.

Edit - the only downside I really had with xvid was that it is GPL (if it was LGPL I would have used that).

This topic is closed to new replies.

Advertisement