1

I want to be able to send an audio stream to Android/IOS devices.

The current encoding for the stream is mp3 128 kbps. If i'd send this over the network it will take huge amount of mobile data.

I was thinking of compressing the data with gzip but i think that would make no difference as mp3 is already a reduced file.

Is there any way to reduce the size of the stream and play it on the mobile device?

Thanks,

Dan

Dan Dinu
  • 32,492
  • 24
  • 78
  • 114

2 Answers2

1

All you can do is re-compress to a lower bit rate and use a different compression method, e.g. AAC. An AAC should sound better at the same bit rate.

Mark Adler
  • 101,978
  • 13
  • 118
  • 158
1

First off, your math is ignoring a key unit. Your MP3 stream is 128 kilobits (note the bits) per second. This comes out to be a little under 60 megabytes per hour after you factor in a little bit of overhead and metadata.

Now, as Mark said you can use a different bitrate and/or codec. For most mobile streams, I choose either a 64kbit or 96kbit stream, and then either MP3 or AAC depending on compatibility. AAC does compress a bit better, providing a better sounding stream at those low bitrates, but you will still need an MP3 stream for some devices.

Also note that you should not assume your users are using the mobile network on their mobile devices. Give your users a choice of which stream to use. Some have unlimited data and great coverage. Others use WiFi all the time.

Brad
  • 159,648
  • 54
  • 349
  • 530