Listen to a shoutcast with Android
Asked Answered
P

3

13

since quite some time I'm trying to listen to .pls files (shoutcasts). I have to say that I failed horrible. Since StreamFurious can do it it must be possible. First I tried to connect to the shoutcast via sockets (TCP and UDP) --> failed. I couldn't even receive one byte from the server.

I'm at the verge of tears. I don't even have a clue what's the best way to establish a connection and afterwards continually download/receive the data stream.

I really hope someone can point me to the right direction and give me a short code snippet if available.

Rgds Layne

Pianette answered 26/12, 2009 at 10:52 Comment(1)
P
14

You can try these resources:

Shoutcast streaming

http://ostermiller.org/shoutgrab/

http://code.google.com/p/streamscraper/

http://code.google.com/p/castor-streamer/

http://mp3imagetagextr.sourceforge.net/ShoutcastPlsDownloader/index.html

From what I can tell, you may need to handle the PLS download (via HTTP if I understand correctly) and parsing yourself, but you can then hand the actual audio stream URLs to MediaPlayer for playback. Assuming those streams are within specifications (and not all are), Android should be able to play them back. But I am not a Shoutcast expert by any means.

Provinciality answered 26/12, 2009 at 12:44 Comment(2)
Thank you so much... finally managed to listen to radio streams thanks to your examples. There is a small pause after caching and switching to the next cache but you made my day!Pianette
@Provinciality is it possible to get Content Type: from 7.html in shoutcast ?Gritty
L
1

Android 2.2 (FroYo) now natively streams Shoutcast streams.

For older devices, in addition to the above links see http://code.google.com/p/npr-android-app/ which includes a proxy for buffering shoutcast streams.

Lusatian answered 8/7, 2010 at 22:30 Comment(0)
R
-2

Maybe late, but VLC for android was the only really stable app I could find for this. I set up an icecast server on my linux box and could listen to it perfectly using VLC on my old Nexus one. The only (stupid) problem VLC has is that you cant bookmark your URLs in it, you always have to type (or paste) them.

Riva answered 19/4, 2013 at 23:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.