Personal computing discussed

Moderators: renee, Captain Ned

 
Dr. Coconut
Gerbil
Topic Author
Posts: 21
Joined: Sat Feb 18, 2012 7:45 pm

Compresion Options

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.
 
derFunkenstein
Gerbil God
Posts: 25427
Joined: Fri Feb 21, 2003 9:13 pm
Location: Comin' to you directly from the Mothership

Re: Compresion Options

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.
Twittering away the day at @TVsBen
 
thegleek
Darth Gerbil
Posts: 7460
Joined: Tue Jun 10, 2003 11:06 am
Location: Detroit, MI
Contact:

Re: Compresion Options

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
 
morphine
TR Staff
Posts: 11600
Joined: Fri Dec 27, 2002 8:51 pm
Location: Portugal (that's next to Spain)

Re: Compresion Options

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 :(
 
bthylafh
Maximum Gerbil
Posts: 4320
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

Re: Compresion Options

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.
Hakkaa päälle!
i7-8700K|Asus Z-370 Pro|32GB DDR4|Asus Radeon RX-580|Samsung 960 EVO 1TB|1988 Model M||Logitech MX 518 & F310|Samsung C24FG70|Dell 2209WA|ATH-M50x
 
thegleek
Darth Gerbil
Posts: 7460
Joined: Tue Jun 10, 2003 11:06 am
Location: Detroit, MI
Contact:

Re: Compresion Options

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).
 
derFunkenstein
Gerbil God
Posts: 25427
Joined: Fri Feb 21, 2003 9:13 pm
Location: Comin' to you directly from the Mothership

Re: Compresion Options

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.
Twittering away the day at @TVsBen
 
ChronoReverse
Gerbil Elite
Posts: 757
Joined: Wed Dec 12, 2007 4:20 pm

Re: Compresion Options

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).
 
Captain Ned
Global Moderator
Posts: 28704
Joined: Wed Jan 16, 2002 7:00 pm
Location: Vermont, USA

Re: Compresion Options

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.
What we have today is way too much pluribus and not enough unum.
 
Dr. Coconut
Gerbil
Topic Author
Posts: 21
Joined: Sat Feb 18, 2012 7:45 pm

Re: Compresion Options

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.
 
derFunkenstein
Gerbil God
Posts: 25427
Joined: Fri Feb 21, 2003 9:13 pm
Location: Comin' to you directly from the Mothership

Re: Compresion Options

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.
Twittering away the day at @TVsBen
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Compresion Options

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.
Nostalgia isn't what it used to be.

Who is online

Users browsing this forum: No registered users and 1 guest
GZIP: On