Streaming audio from internet?

Everything else that doesn't fall into one of the other PB categories.
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Streaming audio from internet?

Post 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!
I like logic, hence I dislike humans but love computers.
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Re: Streaming audio from internet?

Post 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.
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Post 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.
I like logic, hence I dislike humans but love computers.
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Post 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.
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Post 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.
I like logic, hence I dislike humans but love computers.
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Post 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.
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Post 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
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Post 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?
Last edited by Joakim Christiansen on Sun Jan 21, 2007 9:53 pm, edited 1 time in total.
I like logic, hence I dislike humans but love computers.
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Post 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.
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Post 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...
I like logic, hence I dislike humans but love computers.
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Post 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?
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Post 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.
I like logic, hence I dislike humans but love computers.
Post Reply