<html><body><span style="font-family:Arial; color:#000000; font-size:10pt;"><div>The built in player (StageFright) uses a large buffer. If the Icecast mount also uses a large buffer, the buffer in the player can be filled quickly (on a fast connection), otherwise not.<br><br></div> <blockquote id="replyBlockquote" webmail="1" style="border-left: 2px solid blue; margin-left: 8px; padding-left: 8px; font-size:10pt; color:black; font-family:verdana;"> <div id="wmQuoteWrapper"> -------- Original Message --------<br> Subject: [Icecast] Delay playing some streams on Android<br> From: M M <<a href="mailto:mh747@outlook.com">mh747@outlook.com</a>><br> Date: Tue, September 29, 2015 4:13 pm<br> To: "<a href="mailto:icecast@xiph.org">icecast@xiph.org</a>" <<a href="mailto:icecast@xiph.org">icecast@xiph.org</a>><br> <br> <br> I'm writing an Android app to play streams. I use the standard Android "MediaPlayer" library to play streams. I've noticed that some streams start playing without much delay (MPR), but others take quite a while to start (WFMU). The only thing changing in my code is the URI of the Icecast mountpoint. My test device is a Nexus 5 running Android 5.1.1.<br> <br> <a href="http://current.stream.publicradio.org/kcmp.mp3">http://current.stream.publicradio.org/kcmp.mp3</a> starts playing in about 2 seconds. It's a 128 kbps stream from Minnesota Public Radio.<br> <br> <a href="http://stream0.wfmu.org/freeform-128k">http://stream0.wfmu.org/freeform-128k</a> starts playing in about 9 seconds. It's a 128 kbps stream from WFMU.<br> <br> The problem gets worse as the bitrate goes down. 32 kbps streams take quite a while to start.<br> <br> I don't notice this problem in iOS code I've written. I also don't notice it in VLC.<br> <br> You can view the headers with:<br> <br> curl -s -D - <a href="http://current.stream.publicradio.org/kcmp.mp3">http://current.stream.publicradio.org/kcmp.mp3</a> -o /dev/null<br> <br> StackOverflow has several posts about this. For example: <a href="http://stackoverflow.com/questions/6582908/why-does-it-take-so-long-for-androids-mediaplayer-to-prepare-some-live-streams">http://stackoverflow.com/questions/6582908/why-does-it-take-so-long-for-androids-mediaplayer-to-prepare-some-live-streams</a>.<br> <br> Any idea what's going on?<br> <br> <br>                                            <br> _______________________________________________<br> Icecast mailing list<br> <a href="mailto:Icecast@xiph.org">Icecast@xiph.org</a><br> <a href="http://lists.xiph.org/mailman/listinfo/icecast">http://lists.xiph.org/mailman/listinfo/icecast</a><br> </div> </blockquote></span></body></html>
I suppose you were pointing me towards the "burst-size" setting, but it's not totally clear. Please correct me if you meant something else. I increased the burst-size to 131072 bytes, or 128 kibibytes. My Android app now plays the stream without much delay. I still don't know why I didn't notice this problem in an Android emulator. Thanks for the pointer. From: purchasing.05 at multiparadigm.com To: icecast at xiph.org Date: Tue, 29 Sep 2015 14:25:46 -0700 Subject: Re: [Icecast] Delay playing some streams on Android The built in player (StageFright) uses a large buffer. If the Icecast mount also uses a large buffer, the buffer in the player can be filled quickly (on a fast connection), otherwise not. -------- Original Message -------- Subject: [Icecast] Delay playing some streams on Android From: M M <mh747 at outlook.com> Date: Tue, September 29, 2015 4:13 pm To: "icecast at xiph.org" <icecast at xiph.org> I'm writing an Android app to play streams. I use the standard Android "MediaPlayer" library to play streams. I've noticed that some streams start playing without much delay (MPR), but others take quite a while to start (WFMU). The only thing changing in my code is the URI of the Icecast mountpoint. My test device is a Nexus 5 running Android 5.1.1. http://current.stream.publicradio.org/kcmp.mp3 starts playing in about 2 seconds. It's a 128 kbps stream from Minnesota Public Radio. http://stream0.wfmu.org/freeform-128k starts playing in about 9 seconds. It's a 128 kbps stream from WFMU. The problem gets worse as the bitrate goes down. 32 kbps streams take quite a while to start. I don't notice this problem in iOS code I've written. I also don't notice it in VLC. You can view the headers with: curl -s -D - http://current.stream.publicradio.org/kcmp.mp3 -o /dev/null StackOverflow has several posts about this. For example: http://stackoverflow.com/questions/6582908/why-does-it-take-so-long-for-androids-mediaplayer-to-prepare-some-live-streams. Any idea what's going on? _______________________________________________ Icecast mailing list Icecast at xiph.org http://lists.xiph.org/mailman/listinfo/icecast _______________________________________________ Icecast mailing list Icecast at xiph.org http://lists.xiph.org/mailman/listinfo/icecast -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/icecast/attachments/20150930/4d30793f/attachment.htm
I didn't have time to look in an actual config file for the name (burst-size), but you figured it out! StageFright is frustrating and has a history of nasty bugs. You discovered one of its irritating limitations. I think most good stream players avoid it. Miles Whitener MultiParadigm Corporation --------- Original Message --------- Subject: Re: [Icecast] Delay playing some streams on Android From: "M M" <mh747 at outlook.com> Date: 9/30/15 3:01 pm To: "Icecast streaming server user discussions" <icecast at xiph.org> I suppose you were pointing me towards the "burst-size" setting, but it's not totally clear. Please correct me if you meant something else. I increased the burst-size to 131072 bytes, or 128 kibibytes. My Android app now plays the stream without much delay. I still don't know why I didn't notice this problem in an Android emulator. Thanks for the pointer. From: purchasing.05 at multiparadigm.com To: icecast at xiph.org Date: Tue, 29 Sep 2015 14:25:46 -0700 Subject: Re: [Icecast] Delay playing some streams on Android The built in player (StageFright) uses a large buffer. If the Icecast mount also uses a large buffer, the buffer in the player can be filled quickly (on a fast connection), otherwise not. -------- Original Message -------- Subject: [Icecast] Delay playing some streams on Android From: M M <mh747 at outlook.com> Date: Tue, September 29, 2015 4:13 pm To: "icecast at xiph.org" <icecast at xiph.org> I'm writing an Android app to play streams. I use the standard Android "MediaPlayer" library to play streams. I've noticed that some streams start playing without much delay (MPR), but others take quite a while to start (WFMU). The only thing changing in my code is the URI of the Icecast mountpoint. My test device is a Nexus 5 running Android 5.1.1. http://current.stream.publicradio.org/kcmp.mp3 starts playing in about 2 seconds. It's a 128 kbps stream from Minnesota Public Radio. http://stream0.wfmu.org/freeform-128k starts playing in about 9 seconds. It's a 128 kbps stream from WFMU. The problem gets worse as the bitrate goes down. 32 kbps streams take quite a while to start. I don't notice this problem in iOS code I've written. I also don't notice it in VLC. You can view the headers with: curl -s -D - http://current.stream.publicradio.org/kcmp.mp3 -o /dev/null StackOverflow has several posts about this. For example: http://stackoverflow.com/questions/6582908/why-does-it-take-so-long-for-androids-mediaplayer-to-prepare-some-live-streams. Any idea what's going on? _______________________________________________ Icecast mailing list Icecast at xiph.org http://lists.xiph.org/mailman/listinfo/icecast _______________________________________________ Icecast mailing list Icecast at xiph.org http://lists.xiph.org/mailman/listinfo/icecast _______________________________________________ Icecast mailing list Icecast at xiph.org http://lists.xiph.org/mailman/listinfo/icecast -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/icecast/attachments/20150930/9afe0b06/attachment.htm