Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recommended Android music format - mp3, ogg or other? [closed]

I've been asked which format I need the music for my project in and, looking through the documentation, it seems that the Android platform offers a good choice.

Audio is certainly not my forte so I'm wondering if there's a specific format that is best suited for Android playback? The main factors that come to mind are size and CPU overhead for decompression and playback. (The music is to be played in the background of a game, but it's not a particularly CPU intensive game).

Any advice would be very welcome.

like image 262
Rok Avatar asked Mar 25 '11 09:03

Rok


People also ask

Is Ogg format better than MP3?

However, in comparison to MP3, OGG is superior in sound quality and file size alike. It's not as popular, but if your device supports OGG, it's better to pick OGG over MP3 because of smaller file size, higher bitrate and overall audio quality.

Which audio format is best quality?

A lossless audio file format is the best format for sound quality. These include FLAC, WAV, or AIFF. These types of files are considered “hi-res” because they are better or equal to CD-quality.

Which is smaller Ogg or MP3?

What is this? The OGG or OGG Vorbis is another compressed digital audio format. It is not as popular as the MP3, but smaller in file size, as it is even more compressed, so to say. Unlike the patented MP3, OGG is not constrained by any patents, since it is open source and free to all.

What is the difference between MP3 WAV and Ogg?

Wav is a raw format, while mp3 is a compressed format for audio. ogg is more of wrapper format. it can wrap Speex compressed audio, Speex (www speex org)is a very efficient compression technique based on CELP.


2 Answers

Ogg is the "free" choice, of course, and you are using Android. ;)

I'm not aware of any really significant differences in performance for decoding Ogg and Mp3 equivalent audio.

Mp3 might be the better choice if you intend to use your software on several platforms. The implementation would probably be more consistent than Ogg.

like image 144
tamarintech Avatar answered Oct 06 '22 12:10

tamarintech


Android 2.3 and up uses OpenSL ES API, which has great support for MP3. All previous versions and bugs and difficulties with audio here and there. I would still go with MP3 for earlier API versions. Ogg would be a pain to implement. In fact, before Android 2.3 API (version 9, I believe), there were lots of complaints about developing any kind of audio applications for Android.

CORRECTION Android does have .ogg compatibility starting with API version 8.

like image 38
Phonon Avatar answered Oct 06 '22 14:10

Phonon