Jump to content
  • Advertisement
Sign in to follow this  
miminawewe

Flac versus Vorbis

This topic is 4037 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I would like to use ogg flac instead of ogg vorbis for compressing sound for my games. I know ogg vorbis has more compression than ogg flac but I want to use ogg flac because it's lossless (i.e. it doesn't remove information from the audio stream during compression) unlike ogg vorbis. Some of the sounds will be music which can be 5-10 minutes long. I think I read somewhere that the code doesn't have to load the entire sound file to memory in order to play it. So the questions: 1. How does ogg vorbis compare with ogg flac for the above application? 2. After compression flac will have a bigger file than vorbis but does that affect streaming? My thoughts: For question 2: Maybe it will because a 1 minute buffer of flac will have more data than a 1 minute data of vorbis, but is the difference significant in current hardware? THANKS.

Share this post


Link to post
Share on other sites
Advertisement
You've not really stated what the 'application' is, unless you just mean 'playing music'. Generally speaking, a high quality Vorbis file is indistinguishable from a lossless file, especially when you have other sounds going on as well. The benefits of lossless encoding would seem wasted on games, unless I suppose you had plenty of spare space on the CD/DVD I guess.

Bigger files shouldn't really affect the streaming - the speed of decompression is what counts. I don't know how quickly the 2 formats decompress, but that's something worth finding out.

If you're streaming, you don't need a one minute buffer. More like a few seconds. Unencoded wave data takes about 180Kb per second, and any encoding is going to make it smaller than that.

Share this post


Link to post
Share on other sites
The application is a PC video game.
I've read that flac will compress by about 10%-50% and vorbis about 80%, so I guess vorbis is best unless I'm distributing the game with multiple CDs or a DVD.
Thanks.

Share this post


Link to post
Share on other sites
Vorbis is more than enough. Flac is really a waste and I doubt anybody but a snooty audiophile could tell the difference.

The vorbis library makes it really easy to decode the data into a stream, go ahead and check the documentation.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!