Page 1 of 2

Ogg Theora / Speex

Posted: Wed Jul 30, 2008 8:14 am
by jamirokwai
Dear Team and Board,

I'd like to suggest to include the Ogg Theora video codec. It is free, royalty-free,
has good quality, and nice features. And it is used in several comercial-grade
game-productions:

Games that use Theora (from the wiki, see below for link)
- Heroes of Might and Magic V: Uses Vorbis for audio and Theora for video
- Chronicles of Riddick: Escape from Butcher Bay, uses both Theora and Vorbis (audio and video in separate files)
- Serious Sam 2: Uses Theora for cut scenes.
- SimWorld, uses Theora for splash videos and item catalog preview videos (Also uses Vorbis for audio)

You may find information about source-code on the wiki at:
http://wiki.xiph.org/index.php/TheoraSoftwarePlayers

Also a thing to be thought about would be to include Speex for low-bandwidth audio.
Speex is developed to support VoIP, but maybe also used to play speech samples like
in LucasArts-Adventures etc.

Why do I propose these two codecs?
- OGG Vorbis and FLAC are included already. Both belong to XIPH, who develop Theora and Speex
- why were Vorbis and Flac chosen? The same reasons maybe count for Theora and Speec
- the source-code is available, some company has already ported it to Java: http://www.flumotion.net/cortado/
- the codec can be used without royalty-fees (which would be a plus for using PureBasic for comercial games!)
- you don't need to hassle around with installing codecs or the need to clearify if a codec is already installed
- Theora is prepared to (virtually) unlimited channels of audio and video size of app.

The only downside is, that player-source is in beta-state... :O

What do you think?

Re: Ogg Theora / Speex

Posted: Thu Jul 31, 2008 1:51 pm
by jamirokwai
One addition to my above post...

Opera and Mozilla plan to use Theora for the video-embedding-feature on HTML5...

See: http://labs.opera.com/news/2008/07/18/

On the Wikipedia-page about Theora, I read of Ogre integrating Theora-Videos.
http://en.wikipedia.org/wiki/Theora

Here is the forum: http://www.wreckedgames.com/forum/

Anybody? ;)

I don't know C++ and such, so I can't code anything for it to be usable with Purebasic :(

Posted: Thu Jul 31, 2008 2:31 pm
by djes
I think embedded video capabilities would be nice, especially if there's not too much work for PB's team.

Posted: Sun Dec 21, 2008 1:39 pm
by jamirokwai
djes wrote:I think embedded video capabilities would be nice, especially if there's not too much work for PB's team.
Just like to hear from the dev-team, if this could be possible to implement.

It may be one big heap of work, but would help moving PureBasic into
the premier league of GUI/Game/Multimedia-Development Tools for
Freeware/Shareware and Comercial purposes... :)

The CoDecs from Xiph.org are well-commented, but I never tried C/C++ :(

Posted: Tue Dec 23, 2008 2:56 am
by Rescator
Well, considering the PureBasic libs are mostly C it's hopefully not that difficult.
And Ogg Vorbis is already available.

I can definitely see the potential for "built in" Ogg Vorbis and Ogg Theora support in PureBasic.
both codecs are stable, been around for some time, the formats are frozen (Theora was recently frozen, which is why HTML5 plans to use it I guess, and Vorbis as optional for audio too)

That said, just adding the codecs is one thing and most likely not that difficult.
What does need some work however (new or modifying of code)
is improving the native playback stuff, like improve Ogg Vorbis streaming, multichannel, end of stream notification callback and so on.
And similar for Ogg Theora.

I know the PureBasic team has talked about a sort of plugin architecture for compression (and audio codecs as well?), so I guess video would make sense as well.

Re: Ogg Theora / Speex

Posted: Wed Sep 16, 2009 1:44 pm
by jamirokwai
jamirokwai wrote:I'd like to suggest to include the Ogg Theora video codec. It is free, royalty-free,
has good quality, and nice features. And it is used in several comercial-grade
game-productions
Hi PB-Team,

I'd like to ask again about builtin ogg-theora-decoding-support in PB. This would be a great addition to PureBasic: natively playing video without video codecs of Windows, Mac OS X or Linux. Possibly, it would add even more attractivity to the whole language. The count of implementations is rising, the latest one I found is for .NET (http://labs.kissintelligentsystems.com/ ... y/Releases).

Fred, you don't have to promise, but please write about your concerns and the possibilities. The best news would be ogg theora for PB 4.5 or 5.0... :P

Re: Ogg Theora / Speex

Posted: Fri Sep 18, 2009 1:06 am
by Seymour Clufley
+1 (ogg)

Re: Ogg Theora / Speex

Posted: Fri Sep 18, 2009 10:22 am
by Trond
In my opinion, having every application bundling its own codecs its just a waste of space. Just install the directshow ogg theora filter, and PB should play the files with the movie commands.

Re: Ogg Theora / Speex

Posted: Fri Sep 18, 2009 3:26 pm
by jamirokwai
Trond wrote:In my opinion, having every application bundling its own codecs its just a waste of space.
Just install the directshow ogg theora filter, and PB should play the files with the movie commands.
This is true for "cracks" and people like us programming and testing.
But if like you sell your newest game with integrated video... What now?
1. put your cross-platform-approach into the trash -> no, I'd like to have ONE (!) code for three plattforms
2. buy a license for playing mpeg with an integrated library -> to expensive for independent coders
3. use some external tool for playing theora to avoid license-fees -> may be hassling around and it will also bloat your game
4. let the user install free codecs -> hm... no

If theora was a library supported by PureBasic all these drawbacks were wiped away in one step...
Absolutely no license-fees (even for codecs integrated into our fellow OS's), no problem with missing codes, no need of some .dlls, .dylibs, .lib and such, and no need for installing other codecs. The prepared Video will just play...

I'd suspect 90% of gamers don't care for installing Perian on Mac OS, some directshow-filters on Windows or Linux-RPMs - the latter would of course help themselves. Plus: I don't like the registry approach of windows. It's better to just copy your game or tool into some folder, run it or delete it. If you code correctly, there will be absolutely no garbage left. (That indeed IS another question)

And lastly. Yes, it may be a heap of work for PB-Team. But it would put PureBasic featurewise in front of many other languages offering easy game-making as some will clutter around on the harddrives. It's bad behaviour... Why do you have to install 200+ mb .net-libraries to run a simple calculator? (That indeed IS another question)

Fred and the team have already added open-source projects (SQLite, OGG Vorbis, Ogre), why not one more? I'd donate some
bucks (erm, Euros) for OGG Theora support.

Edit: some cleanup of line feeds...

Re: Ogg Theora / Speex

Posted: Fri Sep 18, 2009 5:01 pm
by Trond
4. let the user install free codecs -> hm... no
Installing the codecs as part of the installation can't be that hard, can it? If you can program a commercial-quality game, surely having the install program install all required files would be a piece of cake.

Re: Ogg Theora / Speex

Posted: Fri Sep 18, 2009 5:04 pm
by ts-soft
Trond wrote:
4. let the user install free codecs -> hm... no
Installing the codecs as part of the installation can't be that hard, can it? If you can program a commercial-quality game, surely having the install program install all required files would be a piece of cake.
To many problems with incompatible codecs. A normal program should never install codecs in the windows system. This is IMHO bad.

Greetings
Thomas

Re: Ogg Theora / Speex

Posted: Fri Sep 18, 2009 11:43 pm
by jamirokwai
Trond wrote:
4. let the user install free codecs -> hm... no
Installing the codecs as part of the installation can't be that hard, can it? If you can program a commercial-quality game, surely having the install program install all required files would be a piece of cake.
That depends. If you are going to publish it for Linux, Mac OS X and Windows XP you have to take care for three different installation routines for the codec. You could, if you like. But I would prefer not having to install any codec or other library before being able to run my application or game. That is one of the many reasons for me choosing PureBasic, and not C++ or what-so-ever.

I want my game to be runnable by copying it over to your hard-drive (copying should be supported via an installation routine on WIndows). Did you ever install a game on Mac OS X? It's just drag and drop. Copy it to your hard-drive and run. That is a piece of cake. If you ever tried that, Windows will always get on your nerves when installing... (That indeed is another issue which will never be answered completely, it's a matter of taste :)

And: do you remember the good old DOS-times? The installation did also copy files to your hard-drive, no registry and such. The main advantage today is, that you don't have to hassle around with drivers. This should be true for codecs also. If you need some, don't clutter the system of your customer.

Re: Ogg Theora / Speex

Posted: Fri Sep 18, 2009 11:44 pm
by jamirokwai
ts-soft wrote:
Trond wrote:
4. let the user install free codecs -> hm... no
Installing the codecs as part of the installation can't be that hard, can it? If you can program a commercial-quality game, surely having the install program install all required files would be a piece of cake.
To many problems with incompatible codecs. A normal program should never install codecs in the windows system. This is IMHO bad.

Greetings
Thomas
Thanks :)

Re: Ogg Theora / Speex

Posted: Fri Sep 18, 2009 11:46 pm
by jamirokwai
Before we are loosing focus or starting a Windows vs. Linux vs Mac OS X flame-war... (which we should then continue in a discussion-thread)

My suggestion is stated in the first post: please consider adding OGG Theora Playback to PureBasic. Would be perfect, and I would donate a few (or more) bucks if you succeed :)

Re: Ogg Theora / Speex

Posted: Sat Sep 19, 2009 10:51 am
by Fred
Yes, it's planned, but we don't have release date for it ;)