MP3 vs. Ogg - Resources

MrRey

Member
Licensed User
Longtime User
This is an odd question, I'll grant you all that.

When using mp3 or ogg in SoundPool, is there any advantage of one over the other? I'm wondering if one loads or plays faster, or uses less resources or CPU time?

I've searched here and online with regards to Android and these audio file formats. So far, I can't really find anything useful.

I found one article on stackoverflow where someone asked a similar question. From what I can tell, there's not much difference. One user says as of API level 8, ogg is supported.

Anyone have any experiences about these two?
 

Roger Garstang

Well-Known Member
Licensed User
Longtime User
From what I've read, ogg really isn't a file type, but a container which can contain a stream of data in various file formats. It is more open than mp3 too since mp3 is patented by Fraunhofer...Lame and others get away with using mp3 encoders by being slightly different than true mp3 and releasing their encoders as source code that needs compiled to be used. I actually use m4a (Not the Apple Lossless stuff) and use the encoder also by Fraunhofer in WinAmp with excellent results and usually a little smaller files than mp3.
 
Upvote 0

MrRey

Member
Licensed User
Longtime User
Thanks, Roger. In your apps, do m4a files load and run better?

Obviously file size is an issue, but I like to load fast.

Thanks so much again!
 
Upvote 0

Roger Garstang

Well-Known Member
Licensed User
Longtime User
My apps are business related and sounds tend to annoy people, but on my personal phone I use M4A for everything...even ringtones. It is built into Android, so shouldn't give any problems. I'm not sure of load time differences. It is a little more complicated file structure, but it is also complicated to allow better audio frame sizes/windows, better compression, and more capabilities. I use 3-5 different Android media players playing both MP3 and M4A and I notice no difference in how fast they load. Now how they sound is another story...M4A sounds so much better and at lower bit rates has much less metallic sounds.

My big thing I usually run into is Constant vs Variable bit rates. I prefer Variable so I can use a higher bit rate with better sound and it can use less when needed. It doesn't matter if MP3 or M4A, but many players just don't do variable well still. I have my entire collection of music on the hard drive built in to my van's radio that claims to play them and it always cuts off the last 2-6sec of the song. Same thing with Windows Media Player and Sound Blaster stuff. WinAmp and a couple others play them perfectly as does Android and all the media players I've used on it so far.

When I made my CD collection to MP3 a couple years ago I went VBR at 196 bitrate figuring from my early MP3 days where everyone went 128 I'd get better sound. Turns out most CD audio needs about 256 to cover what the human ear can hear though. I just re-encoded the entire collection a few months ago and in comparing 256VBR MP3 to the max setting on M4A the M4A file was the same size or smaller in most cases and sounded better. So, I converted everything to it.
 
Upvote 0

MrRey

Member
Licensed User
Longtime User
I'm the same way. I backed up my CDs to 256kbps MP3 for my player.

Based on this thread, in order of preference:

M4A
Ogg
MP3

You guys have been lots of help. I'm glad we have this forum.
 
Upvote 0

Roger Garstang

Well-Known Member
Licensed User
Longtime User
Ogg really doesn't have an order of preference. Since it is a container for other formats it may contain a stream that is M4A, that is better than M4A, or that is worse than MP3. It was designed to use the Free Codecs which range in quality, but can be just about anything. A lot of games in desktop and mobile devices use Ogg and sound good, but I can't really say what the performance is as compared to MP3/M4A or what stream codec they use.
 
Upvote 0
Top