My android app takes a livestream's URL as input and plays it using MediaPlayer(). On the emulator, the MediaPlayer starts playing the audio almost instantly. But on a real device (Samsung Galaxy Note 2), it takes almost 100 seconds for the feed to start playing. The computer the emulator runs on and the device both are on the same Wi-fi so it can't be a connection problem. What could be going wrong here?
Asked
Active
Viewed 487 times
0
-
Ok guys, turns out it is pre buffering for 100 seconds and then starting playback. I determined it by closing the wi fi at the exact moment the feed started playing. And it kept playing for 160 seconds after the wi fi had been cut off. So how to reduce this pre buffer time to, like, 2 seconds? – Ankit Rawat Mar 30 '13 at 20:56
-
If you can't find an answer to this you can always use the option to save the data to a temporary file, and playback this, for a lower start delay, I did this when streaming songs from a PC on a local network to an android device. – ArchiFloyd Mar 30 '13 at 23:27
-
1@AnkitRawat If you have access to entire `AOSP` sources, then you can tweak the parameters here : http://androidxref.com/4.2.2_r1/xref/frameworks/av/media/libstagefright/include/NuCachedSource2.h#75 and try. – Ganesh Mar 31 '13 at 14:15
-
I'm having a similar problem where it takes up to two minutes for an audio stream to start playing on a Samsung Galaxy S3. My question here: http://stackoverflow.com/questions/16693601/why-does-it-take-longer-for-some-internet-audio-streams-to-start-playing-on-a-sa – marienke May 22 '13 at 14:19