Search code examples
javashoutcastinternet-radio

Best way to play a radio stream ( shoutcast ) in Java?


I want to code an audio player in Java. java.JavaFX has a very nice support for mp3 playing but I want in my player also the possibility to listen to radio.

The problem is I have searched for some time and I didn't find something that works like I want:

  • MP3SPI - this is nice but just wont play some streams
  • vlcj - I've tested the latest version 1.2.0 but was with a beta version of VLC so I had times when the stream just stopped for no reason.
  • NativeSwing's windows media player but that is a heavyweight component and also I don't want to make it dependable on WMP.

So I'm kind of out of luck. Well guys If you know more about this topic please share it! Thank you!


Solution

  • MP3 playback in Java is a bitch. In nearly any case it's not worth the work you put in it.

    However, this is something that worked for me. It can easily be recoded to play Shoutcast streams.