Page 1 of 1

Streaming audio from internet?

Posted: Sun Jan 21, 2007 9:05 pm
by Joakim Christiansen
Okay, just a quick question!

I'm making this internet radio player thing and was wondering if there is any quick way to stream audio from the net?
Like this link here http://209.143.37.195:8000 it works fine opening it in WMP. But I tried using MCI to stream it and I don't think it can stream from the internet, is there any other Windows API I could use?
Or do I really need to put WMP in a WebGadet and open it there? Or should I try with FMOD?

Any tips would be appreciated!

Re: Streaming audio from internet?

Posted: Sun Jan 21, 2007 9:23 pm
by ricardo
Joakim Christiansen wrote:Okay, just a quick question!

I'm making this internet radio player thing and was wondering if there is any quick way to stream audio from the net?
Like this link here http://209.143.37.195:8000 it works fine opening it in WMP. But I tried using MCI to stream it and I don't think it can stream from the internet, is there any other Windows API I could use?
Or do I really need to put WMP in a WebGadet and open it there? Or should I try with FMOD?

Any tips would be appreciated!
Try with playsound. AFAIK it can play files from a website (i do once the test) si if you point it to the right url maybe it could work.

Otherwise try BASS or FMOD, they are nice.

Posted: Sun Jan 21, 2007 9:30 pm
by Joakim Christiansen

Code: Select all

InitSound()
LoadSound(0,"http://209.143.37.195:8000")
PlaySound(0)
Can't say it works...

I hope BASS or FMOD is not too hard to learn.

Posted: Sun Jan 21, 2007 9:36 pm
by ricardo
Joakim Christiansen wrote:

Code: Select all

InitSound()
LoadSound(0,"http://209.143.37.195:8000")
PlaySound(0)
Can't say it works...

I hope BASS or FMOD is not too hard to learn.
No hard. Both are great.

Im testing both and find it very nice.

BTW http://209.143.37.195:8000 is NOT the url for the stream, you need to point to the REAL stream.

Posted: Sun Jan 21, 2007 9:41 pm
by Joakim Christiansen
ricardo wrote:BTW http://209.143.37.195:8000 is NOT the url for the stream, you need to point to the REAL stream.
So how do I find the real stream? (this URL works when I open it in WMP you know...)
I got this URL from a *.pls file.

Posted: Sun Jan 21, 2007 9:47 pm
by ricardo
I found some netstream example in FMOD, but i think you need the same URL pointing to the real mp3.

AFAIK shotcast shortcuts are like playlists, contain the real url there.

Im interested on this stuff too.

Posted: Sun Jan 21, 2007 9:48 pm
by ricardo
Joakim Christiansen wrote:
ricardo wrote:BTW http://209.143.37.195:8000 is NOT the url for the stream, you need to point to the REAL stream.
So how do I find the real stream? (this URL works when I open it in WMP you know...)
I got this URL from a *.pls file.
Search from .pls file the tags. I guess they point somewhere to the real stream.
Open http://209.143.37.195:8000 on your broswer and you will see some webpage

Posted: Sun Jan 21, 2007 9:52 pm
by Joakim Christiansen
This was the most real stream URL I got, I dug inside the radio stations pls file to find it. Why you get a webpage when you open it I guess is because it detects that you're opening it in a browser.

But anyway, know any other webpages where I can get links to radio streams?

Posted: Sun Jan 21, 2007 9:52 pm
by ricardo
FMOD support to read .pls files. Just need some little coding for read the tags, but looks like it is what you are looking for :)

Download FMOD and search for the netstreams example.

Posted: Sun Jan 21, 2007 11:15 pm
by Joakim Christiansen
Well, I got it working.
I just used a WebGadget with a Windows Media Player object which I then gave the stream url and then I hide it so you'll never know.
I will post the source code for my Shoutcast Radio Player here when I'm done with it, and btw making a program like that is against their copyright laws...

Posted: Sun Jan 21, 2007 11:31 pm
by ricardo
Joakim Christiansen wrote:Well, I got it working.
I just used a WebGadget with a Windows Media Player object which I then gave the stream url and then I hide it so you'll never know.
I will post the source code for my Shoutcast Radio Player here when I'm done with it, and btw making a program like that is against their copyright laws...
But for controling soundlevel, etc you need to use javascript.

I guess BASS or FMOD solutions could be core complete, even with EQ and more stuff. Why don't geving a try?

Posted: Sun Jan 21, 2007 11:41 pm
by Joakim Christiansen
ricardo wrote:I guess BASS or FMOD solutions could be core complete, even with EQ and more stuff. Why don't geving a try?
I guess I will once, but I just needed something quick for now.