Playing IceCast stream

All your problems with Audio, Video and Images.

Playing IceCast stream

Postby xplodwild » Sun Oct 09, 2011 12:27 pm

Hi everyone,

I'm having an issue with IceCast audio stream, using MediaPlayer. The streams starts and plays for some seconds, then just stops. Here's the code I'm using :

Code: Select all
      MediaPlayer mediaPlayer = new MediaPlayer();

      try {
      } catch (Exception e) {
         // TODO Auto-generated catch block
         Toast.makeText(this, e.toString(), Toast.LENGTH_LONG).show();


   public void onPrepared(MediaPlayer arg0) {

When I press my "Play" button, it buffers then starts playing, but it stops after 10-15s. When I output buffer update, the progress value decrease until reaching -(2^32)/2. The sound just stops then and never starts again.

What could be the issue ?
Once Poster
Once Poster
Posts: 1
Joined: Sun Oct 09, 2011 12:17 pm


Re: Playing IceCast stream

Postby ramesh.kec.85 » Sat Oct 15, 2011 5:15 am

Use mediaPlayer.prepareAsync() instead of prepare ,because of you are using stream..

Posts: 27
Joined: Sat Jul 30, 2011 10:05 am
Location: Ahmedabad


Return to Multimedia Problems

Who is online

Users browsing this forum: Google [Bot] and 14 guests