Author Topic: .OGG?  (Read 6518 times)

0 Members and 1 Guest are viewing this topic.

Offline chief1983

  • Still lacks a custom title
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
First off all, if you don't know anything about audio video encapsulation into avi and ogg formats, and don't really care, don't read this because it will just confuse you.

Ok, now that I've scared everyone away, I'd like a little clarification.  I've seen it said that .avi support is being 'dropped' and that .ogg support is staying.   First of all, I was under the impression that .ogg was the extension commonly used to refer to an Ogg Vorbis audio file, and that for a video file containing ogg vorbis audio the commonly accepted (but I'm not sure about standardized) extension was .ogm.  As this is just a capsule format:

1.  What makes it so special/different from avi, another capsule format, that warrants dropping avi support? 

2.  I notice that the avi cutscenes use MP3 audio and XviD video, is it the use of MP3 audio that is going to cause avi to be abandoned, in favor of the open ogg vorbis audio format?

3.  Then would that also imply that avi and ogg cutscenes have the same video data, and only a different audio stream?

I don't currently have a copy of the 'ogg' cutscenes to check this with, but I'm curious if these are Ogg capsules with vorbis audio and xvid video, then why are they not referred to as 'ogm' instead of just 'ogg', or 'ogg/xvid'.  Hope I didn't confuse any brave souls who tried to read this after all.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
1.  What makes it so special/different from avi, another capsule format, that warrants dropping avi support?

You've got it arse about face here. It's not that ogg is so good that we're dropping avi. It's that avi is so bad that we have to drop it and find something to replace it. The problem with avi is the licensing for a decoder. We can't find a decent one with the right kind of license to allow it in FSO.

On Windows we currently play avi files by using DirectShow to play them. This is a moronic solution. Anyone who knows anything about codecs will know how easy it is to stuff up your codecs to the point where some programs will play them, some won't and others do a halfhearted job of it. The result is that people come to us complaining that movies don't work for reasons which have absolutely nothing to do with the SCP and are due to things like DivX Toolbar getting in the way.
 A good solution for playing avi would have been to find a freeware decoder which could be used with FSO. I've never understood the licencing restrictions perfectly but the gist of it is that we are on LGPL and therefore can't use GPL code. That rules out pretty much all the decoders we can think of.

The upshot is that we're going over to Theora so that we can include a decoder in the FSO code for something a bit easier to work with than MVE.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Bob-san

  • Wishes he was cool
  • 210
  • It's 5 minutes to midnight.
I have a similar problem outside of FSO with OGG/OGM; WinAmp and WMP 10 both refuse to open/play the OGG movies. A bit annoying... i have the AVI versions somewhere... taking up space like usual... can you point us toward a codec that will work outside of FSO?
NGTM-1R: Currently considering spending the rest of the day in bed cuddling.
GTSVA: With who...?
Nuke: chewbacca?
Bob-san: The Rancor.

 
http://xiph.org/downloads/
Go to "Third-Party downloads" and download the DirectShow Codec.
That should work, I think...
I use VLC to play Theora-Movies.

 

Offline Mars

  • I have no originality
  • 211
  • Attempting unreasonable levels of reasonable
I use VLC for everything on Windoze

 
OGM is a pretty poor container as well but at least it's better for integration.  I'd prefer mkv but you can't expect everything =)

 

Offline Nix

  • 28
  • In the morning!
Am I the only one who doesn't have a problem with Divx-based AVI files?  I've never had a problem with them at all, but then again, this is my system, and others are different from mine.

Anyways, is the point being made to use a native decoder in the engine which doesn't go through the DirectShow hoops, one that provides comparable quality, and is open sourced?  I hope that's why AVI support is going bye-bye. 

 
  

Offline taylor

  • Super SCP/Linux Guru
  • 212
    • http://www.icculus.org/~taylor
First of all, I was under the impression that .ogg was the extension commonly used to refer to an Ogg Vorbis audio file, and that for a video file containing ogg vorbis audio the commonly accepted (but I'm not sure about standardized) extension was .ogm.
OGG is a container format, which means it can contain any number of things.  The primary ones are Vorbis, for audio, and Theora, for video.  Vorbis has become synonymous with .ogg since it was available for so long as the only option.  It was never intended to be all there is though, and that is readily evident to anyone who as ever written code for OGG support.

OGM is a container format, OGG is a container format, but they are totally different.  Whatever morons started naming OGG movies as .ogm really messed things up for everyone.  Especially since there is a real container format called OGM which uses .ogm.  The name change was likely done to cover up badly written OGG decoders, and Windows' ignorant reliance on file extensions to determine file type.  The specs dictate that OGG is a container and may contain more information that you can deal with.  In that case you are to write your code to handle what you know, and silently skip the rest.

That means that something like WinAmp should play an OGG movie.  It would only play the audio portion, but it would play.  If it doesn't then it's a very poorly written decoder.  Is that a problem with WinAmp, yes.  Do we have a similar problem with FS2_Open, yes.  Our audio steaming code for voices and music can't handle using a Theora movie as just audio.  That is already on the todo list and will be fixed, but we are still just as guilty about not supporting the format properly.

1.  What makes it so special/different from avi, another capsule format, that warrants dropping avi support?
Already been answered.  Technically though, we never had AVI support.  We simply faked it.

2.  I notice that the avi cutscenes use MP3 audio and XviD video, is it the use of MP3 audio that is going to cause avi to be abandoned, in favor of the open ogg vorbis audio format?
With the OGG container we are using Theora for video and Vorbis for audio.  Vorbis counts for both movies, sound effects, music, voices ... everything.  We can't support MP3, we never have, and we never will.

3.  Then would that also imply that avi and ogg cutscenes have the same video data, and only a different audio stream?

I don't currently have a copy of the 'ogg' cutscenes to check this with, but I'm curious if these are Ogg capsules with vorbis audio and xvid video, then why are they not referred to as 'ogm' instead of just 'ogg', or 'ogg/xvid'.  Hope I didn't confuse any brave souls who tried to read this after all.
No, we are using Theora for video.  We can't and won't use XviD.  We can't and won't use DivX.  Our only real option for a current and advanced video codec was to use Theora.  It wasn't our only option overall, but is far better for us.  Since we already have Ogg and Vorbis support embedded in the game, all we had to do was add basic Theora support, as we already had the other components.  This means that by using Theora we not only got an advanced and properly supported video codec in the game, but we did using the least amount of resources possible, reusing the existing container and audio components and simply adding a video component to it.

 

Offline Mets

  • 24
Am I the only one who doesn't have a problem with Divx-based AVI files?  I've never had a problem with them at all, but then again, this is my system, and others are different from mine.
I never had a problem - I thought they were fine and they worked with D3D, BUT, as taylor kindly explained to me, it wasn't working for our linux users, and apparently that's a lot of people.  Ogg/Theora works for everybody, and the quality is the same.  They're even a bit smaller in size, although, I must admit, it is kind of annoying having to constantly download new movie formats.

A good solution for playing avi would have been to find a freeware decoder which could be used with FSO. I've never understood the licencing restrictions perfectly but the gist of it is that we are on LGPL and therefore can't use GPL code. That rules out pretty much all the decoders we can think of.
If we are LGPL, then we can use GPL.  Anybody can use GPL, that's the whole point, and we are certainly distributing FSO for free.  Ask Red Hat and Suse :)

 

Offline taylor

  • Super SCP/Linux Guru
  • 212
    • http://www.icculus.org/~taylor
A good solution for playing avi would have been to find a freeware decoder which could be used with FSO. I've never understood the licencing restrictions perfectly but the gist of it is that we are on LGPL and therefore can't use GPL code. That rules out pretty much all the decoders we can think of.
If we are LGPL, then we can use GPL.  Anybody can use GPL, that's the whole point, and we are certainly distributing FSO for free.  Ask Red Hat and Suse :)
We aren't LGPL though.  The source code released by Volition specifically states that you can not benefit financially from the code or anything derived from it.  That makes it not fit the "open source" definition, and therefore restricts the licenses that we can use.  We can't use GPL'd code at all (GPL requires that you be allowed to profit from the code and the works derived from it), and LGPL use needs to be kept to a bare minimum for simplicity sake (we will probably only ever use OpenAL and SDL, which are both LGPL).  BSD style licenses are the best for us, like we have with Ogg, Vorbis, Theora, libjpeg and lua.  Those things don't require you to install anything else or for us to provide anything else, it's all embeded directly in the game.  At most we just have to indicate that we use them (check out the in-game credits for the copyright notices).

For codec use though, the problem is more about patents than license.  All of the MPEG stuff (like MPEG-4 and MP3) is heavily patented, XviD is GPL'd so we can't use it at all, and few other codecs actually work out well for our needs.  Theora is also patented, but by accepting the license and using the code, we are granted irrevocable use of the technology.


But, the big point is that we now have something which makes everyone happy.  The users and modders have small and quality movies, the devs have less bugs to worry about since it's all under our control, and the movies work on all supported platforms.  There will probably never been another format change.  We will keep MVE support for the original movies on the retail CD-ROMs, but from now on every movie should be in Theora format.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Ah. I knew that was the reason that we couldn't use GPL code I just got the licence we are under wrong cause I knew we had LGPL code in the game :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Bob-san

  • Wishes he was cool
  • 210
  • It's 5 minutes to midnight.
Do you have an encoder for Adobe Premire Elements 2.0? I have a movie that is entirely too large; the raw AVI video (640x480, 30fps, 53 seconds long, no sound, uncompressed at 1.3 GB) that I currently have recorded to a MPEG2-SVCD (3m20s with a voiceover, about 78mb) for support with PAL specifications and a good resolution.

I just need the encoder. Most people who don't have a thousand-dollar budget will buy Premire Elements; inexpensive and works relatively well.
NGTM-1R: Currently considering spending the rest of the day in bed cuddling.
GTSVA: With who...?
Nuke: chewbacca?
Bob-san: The Rancor.

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Ah. I knew that was the reason that we couldn't use GPL code I just got the licence we are under wrong cause I knew we had LGPL code in the game :)
Holy crap.  Punctuation, dude. :p

 

Offline Bob-san

  • Wishes he was cool
  • 210
  • It's 5 minutes to midnight.
Anyone know a good encoder?
NGTM-1R: Currently considering spending the rest of the day in bed cuddling.
GTSVA: With who...?
Nuke: chewbacca?
Bob-san: The Rancor.

 
yeah dBpowerAMP Music Converter is awesome, however to convert to ogg you need to download the plugin, which can easliy be done by right clicking an ogg file you already have and click convert to, it will automaticly send you to the exact page that has the plugin, and it auto installs it.

 
yeah dBpowerAMP Music Converter is awesome, however to convert to ogg you need to download the plugin, which can easliy be done by right clicking an ogg file you already have and click convert to, it will automaticly send you to the exact page that has the plugin, and it auto installs it.

Uhm... He meant OGG-Theora! Not only OGG-Vorbis...
OGG is only the Container. Theora and Vorbis are the actual Codecs...

Here's what I used to convert my AVIs to OGG-Theora:
http://www.v2v.cc/~j/ffmpeg2theora/