Easiest way to play video with SDL ?
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!
Drew put together a great guide on playing video files with SMPEG in SDL not too long: Playing Video Files with SMPEG.
But doesn't SMPEG only support mpeg/mpg files?
I want to play compressed video files, such as AVI, WMV....
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).
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
Popular Topics
Advertisement