Compresion Options

The place to sound off on all things related to audio, from sound cards to speakers.

Moderator: Captain Ned

Compresion Options

Postposted on Sat Apr 07, 2012 6:52 pm

Hi, it's me again. Just wondering, which format would you recommend for storing audio in a computer game? I want something that doesn't sound terribly compressed and doesn't take up a whopping amount of space. I thought about .OGG but I wasn't certain.
Dr. Coconut
Gerbil
 
Posts: 21
Joined: Sat Feb 18, 2012 7:45 pm

Re: Compresion Options

Postposted on Sat Apr 07, 2012 7:41 pm

FLAC is relatively small, around 50% of 16-bit/44kbps BWF (so around half the size of CD audio). If that's still too large, 192-256kbit AAC is probably the next best thing.
I do not understand what I do. For what I want to do, I do not do. But what I hate, I do.
derFunkenstein
Gerbil God
Gold subscriber
 
 
Posts: 21562
Joined: Fri Feb 21, 2003 9:13 pm
Location: WHAT?

Re: Compresion Options

Postposted on Sun Apr 08, 2012 12:00 pm

Even though this was written back in 2003, this article may be of use to ya:

http://www.gamedev.net/page/resources/_ ... ames-r1902
thegleek
Darth Gerbil
Gold subscriber
 
 
Posts: 7367
Joined: Tue Jun 10, 2003 11:06 am
Location: Detroit, MI

Re: Compresion Options

Postposted on Sun Apr 08, 2012 12:00 pm

High quality OGGs. A lot of devs do this, especially since it's a completely open standard.
There is a fixed amount of intelligence on the planet, and the population keeps growing :(
morphine
Grand Admiral Gerbil
Silver subscriber
 
 
Posts: 10093
Joined: Fri Dec 27, 2002 8:51 pm
Location: Portugal (that's next to Spain)

Re: Compresion Options

Postposted on Sun Apr 08, 2012 12:28 pm

Ogg Vorbis should do well enough, and you won't have to worry about Fraunhofer seeking licensing fees as you would from using MP3.

FLAC is pointless because a .FLAC is several times larger than an .OGG and with a high enough bitrate you won't notice the difference.
Think for yourself, schmuck!
i5-2500K@4.3|Asus P8P67-LE|8GB DDR3-1600|Powercolor R7850 2G|1.5TB 7200.11|1988 Model M|Saitek X-45 & P880|Logitech MX 518|Dell 2209WA|Sennheiser PC151|Asus Xonar DX
bthylafh
Grand Gerbil Poohbah
 
Posts: 3235
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

Re: Compresion Options

Postposted on Sun Apr 08, 2012 12:55 pm

From the very link I posted in which everyone seems to have ignored:

.OGG wrote:This format has been getting a good bit of attention lately. The format hasn't been widely used yet, but it is catching on. You can find information for developing with the Ogg Vorbis format at ( http://www.xiph.org/ogg/vorbis/download.html ). Here you can use links to find the files you need. You can get the Win32 SDK and a few other useful files.

To show the compression technology of the OGG format, I downloaded a program found on the http://www.vorbis.com/ site: http://www.vorbis.com/files/1.0/windows ... -win32.zip

This utility takes audio files and lets you drop them into the window and converts them to the .OGG file for you. You can change parameters for the application, and I played around with the quality settings to get a good balance between quality and size.

I first set the quality setting in the utility to 1.0 as someone had suggested to me. The quality was ok, but I could tell that it wasn't anywhere close to the original. I played around with it until I got a suitable sound at quality setting 2. The .OGG I got was 2.99 MB and sounded good! Very cool.

As a note about the previous version of this article, I was using Sound Forge to convert to the OGG format and at that time the best compression for the OGG file was a bit higher than an MP3, but using the utility from the site, presumably much newer, I got this decrease in size.

Bottom Line- Best compression found in this experiment for song quality audio. Some neat utilities can be found on the site to help you convert your songs to the format without having to write code to do it yourself (always a plus).
thegleek
Darth Gerbil
Gold subscriber
 
 
Posts: 7367
Joined: Tue Jun 10, 2003 11:06 am
Location: Detroit, MI

Re: Compresion Options

Postposted on Sun Apr 08, 2012 1:51 pm

It's not all about you, gleek.
I do not understand what I do. For what I want to do, I do not do. But what I hate, I do.
derFunkenstein
Gerbil God
Gold subscriber
 
 
Posts: 21562
Joined: Fri Feb 21, 2003 9:13 pm
Location: WHAT?

Re: Compresion Options

Postposted on Sun Apr 08, 2012 3:11 pm

If you want lossless, use FLAC.

Otherwise, just stick with LAME encoded MP3 (use the -v2 preset if you want good quality, use -v0 if you want transparency).
ChronoReverse
Gerbil Elite
 
Posts: 738
Joined: Wed Dec 12, 2007 4:20 pm

Re: Compresion Options

Postposted on Sun Apr 08, 2012 3:24 pm

ChronoReverse wrote:If you want lossless, use FLAC.

Agreed. Over time I've been reconverting my old .shn and .ape ROIOs to FLAC as one day I will install a music server and all of the streaming server clients grok FLAC.
Life is hard; but it's harder if you're stupid. Big Al.
Captain Ned
Global Moderator
Gold subscriber
 
 
Posts: 20650
Joined: Wed Jan 16, 2002 7:00 pm
Location: Vermont, USA

Re: Compresion Options

Postposted on Sun Apr 08, 2012 4:40 pm

Thanks guys, I heard about .OGG awhile ago, and since a lot of game developers use it, I figured it would be a safe bet. As for .FLAC, Game Maker(What I use) doesn't support it, although their may be a plugin for it somewhere.
Dr. Coconut
Gerbil
 
Posts: 21
Joined: Sat Feb 18, 2012 7:45 pm

Re: Compresion Options

Postposted on Sun Apr 08, 2012 9:17 pm

Dr. Coconut wrote:Thanks guys, I heard about .OGG awhile ago, and since a lot of game developers use it, I figured it would be a safe bet. As for .FLAC, Game Maker(What I use) doesn't support it, although their may be a plugin for it somewhere.

FMOD supports FLAC: http://gmc.yoyogames.com/index.php?showtopic=333705

If you're concerned about file size, though, OGG is probably the smallest royalty-free file you can create.
I do not understand what I do. For what I want to do, I do not do. But what I hate, I do.
derFunkenstein
Gerbil God
Gold subscriber
 
 
Posts: 21562
Joined: Fri Feb 21, 2003 9:13 pm
Location: WHAT?

Re: Compresion Options

Postposted on Mon Apr 09, 2012 1:48 am

I agree with the people recommending OGG. Royalty-free*, and close enough to CD quality for most purposes even at modest (~160) bitrates. If you're willing to sacrifice a little more quality, you can crank the rate down even lower. The compression artifacts it introduces at lower bitrates aren't as objectionable to most people as MP3 compression artifacts; e.g. it is less susceptible to the weird whooshing/underwater effect MP3 is known for. I would still call it roughly "FM radio quality" even at 96 kbit/sec.

*Yes, I know there are free MP3 encoders (e.g. LAME). But IIRC anyone who uses MP3 format without getting the appropriate licensing from Fraunhofer is *technically* in violation of their patents. Of course nobody is going to care if it is for personal use; but if this is for a product which you may want to distribute commercially, licensing is a consideration.
(this space intentionally left blank)
just brew it!
Administrator
Gold subscriber
 
 
Posts: 38139
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer


Return to Echo Vale

Who is online

Users browsing this forum: No registered users and 3 guests