4

We are experiencing almost the exact opposite of what is mentioned here: Why does it take so long for Android's MediaPlayer to prepare some live streams for playback?

I've tested multiple streams but two in particular

1 - http://usa8-vn.mixstream.net:8138 - SampleRate: 32000Hz and Bitrate: 96 kb/s

2 - http://source01.platform02.true.nl:800 - SampleRate: 44100Hz and Bitrate: 128 kb/s

The lower bitrate stream starts playing instantly (as soon as the media player is prepared), while the higher bitrate stream takes up to two minutes to start playing. Also, when attempting to stream the higher bitrate stream I get MediaPlayer error (1, -110) (which is supposedly a MEDIA_ERROR_UNKNOWN, and MEDIA_ERROR_TIMED_OUT - obviously, because it takes too long to load something). Then, when I stop the stream, I see this in my LogCat:

05-22 20:26:13.625: E/MediaPlayer(23818): stop called in state 0
05-22 20:26:13.625: V/MediaPlayer(23818): message received msg=100, ext1=-38, ext2=0
05-22 20:26:13.625: E/MediaPlayer(23818): error (-38, 0)
...
05-22 20:26:13.645: W/MediaPlayer(23818): mediaplayer went away with unhandled events

I can't find a -38 code on the Android site, so I don't know what that is. I also am not sure which state is state 0. I'm assuming Idle because the Android site state:

There is a subtle but important difference between a newly constructed MediaPlayer object and the MediaPlayer object after reset() is called. It is a programming error to invoke methods such as ... stop() ... in the Idle state for both cases.

Anyway, the point is that I don't think it's like the before mentioned link suggests, because the higher bitrate is supposed to fill the buffer quicker than the lower bitrate stream, right? So why does it take so long to start the stream?

As a side note, this works perfectly fine on the following devices: Samsung Galaxy Music, - Note, - Note II, - S II, - S III mini and Google Nexus devices. It's JUST on the Samsung Galaxy S III that we're experiencign this lag in streaming live music from the internet.

Why??

Community
  • 1
  • 1
marienke
  • 2,465
  • 4
  • 34
  • 66
  • Oh, my other question on the same issue is here: http://stackoverflow.com/questions/16672568/mediaplayer-error-1-1004-aka-media-error-io-trying-to-stream-music-on-samsun – marienke May 22 '13 at 13:52
  • `-38` is `INVALID_OPERATION` (== `-ENOSYS`). So it's telling you that you can't call `stop()` on an idle `MediaPlayer`, just like the documentation you quoted says. – Michael May 22 '13 at 14:12
  • Ok, thanks. So I was right about that (thanks for stating what the -38 is for) :) However, I still don't know why it takes so long to load or why it's not playing at all. – marienke May 22 '13 at 14:18
  • First off, rule out any connectivity issues. Reproduce the issue with your own streams on a local server, with the device over WiFi. If you are unable to reproduce, it could be a problem with a slow connection, or it could be that the original is encoding their stream in such a way that it is hard to sync to. (You didn't mention what codec is in use... that plays an important role in this.) – Brad May 23 '13 at 13:55
  • Thanks, Brad! I'm using MPEG codec [sample rate of 44100Hx and bitrate of 128 kb/s). Well, that's what VLC says when I stream it over it and check the info. Will work on ruling out the connectivity issue. But for when it's not that :) what else do you suggest? – marienke May 23 '13 at 14:47
  • I've seen a similar issue on our test S3. If you remove any filters on the log and look a little higher up than where the error -110 is thrown do you also get: "E/OMXCodec: [OMX.SEC.MP3.Decoder] Timed out waiting for output buffers: 0/2" – Keab42 May 29 '13 at 13:26
  • 2
    Thanks for everyone's comments. We've since then discovered that it's some kind of firmware issue on the Samsung S3. Apparently they're working on it. Apparently even a big thing like the BBC app also does not work on the S3 because of streaming audio from the internet. – marienke May 30 '13 at 07:18
  • Hi @marienke, can you provide a link to some samsung bug tracker about this issue please ? Thanks in advance – tokou Nov 18 '13 at 15:56

0 Answers0