Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Streaming audio/radio in Java?

I've been looking around the entire web, and tried a bunch of different stuff, but I can't figure out how to play streaming audio in java - which is crucial for the application Iam developing now. It's a radio. I've already written it for the web, but I want a desktop version, and I though java might be the way to go.

Streams look like this (mostly MP3s): http://lyd.nrk.no/nrk_radio_mp3_mp3_h (example from NRK MP3 - a radio channel in Norway).

So where should I go from here? I've tried both JMF, FMJ and a lot of other stuff. I just want to stream audio.. I appreciate all answers, please help me out!

like image 531
Steffen Martinsen Avatar asked May 25 '26 15:05

Steffen Martinsen


1 Answers

Have you tried Java FX 2 (latest version is 2.1)? It has a media component that's rather easy to use. Works well for video including streaming video (even h.264 in JavaFX 2.1) in my experience. Can play normal mp3 files with it, never tried streaming mp3 though.

like image 180
Mattias Isegran Bergander Avatar answered May 28 '26 04:05

Mattias Isegran Bergander



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!