2

I create around 1000 audio files via sox for my android application, each containing a recording of a word. To safe space I want to keep the file size as small as possible.

Should I use .mp3 or .ogg? Which settings should I use?

Christian
  • 25,249
  • 40
  • 134
  • 225

3 Answers3

1

Have you checked that question on SO Smallest audio file: MP3, Ogg, or Wav? ?

@keyboardP said:

Of those three, Ogg would usually be smaller than MP3. Both would be much smaller than the uncompressed WAV. Of course, there may be other factors that come into play for your site such as quality (not too much of a noticeable difference for most purposes) and browser support for each type.

The file size will only affect the time it takes to download the file to the user's machine. It won't necessarily determine Javascript execution speed. There may be other things in your code causing the performance drops (unless you've narrowed it down to the file size of the audio files).

Community
  • 1
  • 1
deadfish
  • 11,996
  • 12
  • 87
  • 136
  • With naive input that just specifies the format the ogg file that sox produces on my machine seems to be bigger than the mp3. As such the general suggestion that ogg should be smaller doesn't help but only motivates the question. – Christian Mar 11 '15 at 10:30
1

If little loss in quality doesn't affect your application than using audio-grabber to decrease the bit-rate of .ogg files will give you amazingly small audio files.

Saurav
  • 560
  • 4
  • 17
0

Since Android supports both of the codecs natively I would definetly choose the Vorbis codec. At low bitrates the Vorbis codec produces a much higher clarity than MP3 and even the file size is smaller.

In general I would recommend to encode the sound files with the aoTuV encoder (which is a third-party development of the official Vorbis encoder which further improves low bit-rate quality) in quality level 1 (approximately 80 kbps).

Frederik Schweiger
  • 8,472
  • 6
  • 25
  • 27
  • How do I use aoTuV in sox? – Christian Mar 25 '15 at 22:56
  • If you want to use sox directly with the aoTuV encoder you will have to install libvorbis from the aoTuV sources and then build sox. Here you can find a nice tutorial on how to build sox with support for vorbis: http://quadloops.com/blog/installing-sox-in-ubuntu-12-04-and-working-with-ogg-and-vorbis-formats/ – Frederik Schweiger Mar 25 '15 at 23:38