Hello
I am trying to understand how to play internet radio stations through a web page. I have looked around at sites online and found that some stations can be accessed through .pls or .m3u files played through a desktop application like winamp and have seen some played in the browser with Javascript.
unfortunately my experience is very limited with Javascript. (i wrote a simple calculator a while ago to try out the language). I do have next to me a couple of Javascript books and some printed documentation on jquery but time really is a factor and i was hoping to find some documentation looking specifically at streaming / playing music from a URL online.
i have looked around on google (and the forum) but seem to be coming up mostly with sites teaching how to set up a radio station, which is not what i am after. Or programs that play music files stored locally to the site. If anyone has some experience or knows a good online resource it would really help me out.
thank you in advance.
internet radio advice
Page 1 of 110 Replies - 3028 Views - Last Post: 03 June 2010 - 05:06 AM
Replies To: internet radio advice
#2
Re: internet radio advice
Posted 30 March 2010 - 06:42 AM
I'd suggest that you find a site online that does what you're wanting to do and do a "view source" of the page where the radio content is playing.
Normally, it's done through the use of an embedded player and a source URL but it can be done several different ways. For instance, NPR's live listen feed goes through this URL: http://www.npr.org/t...e1&islist=false. WFLA online uses this URL: http://www.970wfla.c...&channel_title=
Try those, look behind the scenes and see what they're doing. Might give you hints for where to look further.
Good luck!
Normally, it's done through the use of an embedded player and a source URL but it can be done several different ways. For instance, NPR's live listen feed goes through this URL: http://www.npr.org/t...e1&islist=false. WFLA online uses this URL: http://www.970wfla.c...&channel_title=
Try those, look behind the scenes and see what they're doing. Might give you hints for where to look further.
Good luck!
#3
Re: internet radio advice
Posted 30 March 2010 - 07:14 AM
http://www.hypergurl.com/music.html. This is about using the <embed> tag to play media on a website.
#4
Re: internet radio advice
Posted 30 March 2010 - 07:56 AM
Thanks for the help, was just sitting down to continue looking into this. I'll start with the links you both posted and see where i can get.
thanks again.
thanks again.
#5
Re: internet radio advice
Posted 30 March 2010 - 08:03 AM
The big difference you'll discover is between playing a music, podcast, wav...whatever static kind of sound file...and streaming a live audio feed.
The first is pretty basic and easy to do. The latter is a little more complex to set up...or so I've heard. I know someone who did it but I've not done the live streaming myself.
The first is pretty basic and easy to do. The latter is a little more complex to set up...or so I've heard. I know someone who did it but I've not done the live streaming myself.
#6
Re: internet radio advice
Posted 31 March 2010 - 05:35 AM
hi
I spent last night reading a little more into internet radio,
I started with the hypergurl.com/music.html link and followed that creating a page to play a locally stored mp3 file, which worked fine.
I then started reading through the source code from the two links npr.org, 970wfla.com as well as from another website i had come across over the weekend (live365). From the source code i could see that these websites were using a mixture of javascript and flash. I don't have adobe flash so started looking around for an alternative way of working with actionscript and came across flexSDK.
i also spent some time reading through some information about internet radio to see if i could get a clearer idea of how it worked, I did have some trouble finding technical information on this. There are plenty of sites explaing what internet radio is and whats involved, server and client software etc. and how streaming allows the audio to be played before download is complete. This i was already aware of but im having trouble understanding how audio information is used from this stream.
If i add a URL to movie player, the radio starts. If i add the same thing to the <embed> tag and click the link i get a web page with the station information. Does anyone know of an online resource or a book i can get that will explain that missing part. What work is needed to take the audio from this link and process it?
I am going to continue going through the source code from the others sites. But feel taking the time to understand this better would help me to create a better solution.
If get any further with this soon ill post any information i find here incase anyone else looking for something similar comes across this thread.
I spent last night reading a little more into internet radio,
I started with the hypergurl.com/music.html link and followed that creating a page to play a locally stored mp3 file, which worked fine.
I then started reading through the source code from the two links npr.org, 970wfla.com as well as from another website i had come across over the weekend (live365). From the source code i could see that these websites were using a mixture of javascript and flash. I don't have adobe flash so started looking around for an alternative way of working with actionscript and came across flexSDK.
i also spent some time reading through some information about internet radio to see if i could get a clearer idea of how it worked, I did have some trouble finding technical information on this. There are plenty of sites explaing what internet radio is and whats involved, server and client software etc. and how streaming allows the audio to be played before download is complete. This i was already aware of but im having trouble understanding how audio information is used from this stream.
If i add a URL to movie player, the radio starts. If i add the same thing to the <embed> tag and click the link i get a web page with the station information. Does anyone know of an online resource or a book i can get that will explain that missing part. What work is needed to take the audio from this link and process it?
I am going to continue going through the source code from the others sites. But feel taking the time to understand this better would help me to create a better solution.
If get any further with this soon ill post any information i find here incase anyone else looking for something similar comes across this thread.
#7
Re: internet radio advice
Posted 05 April 2010 - 07:42 PM
A radio station is played via the web through either a flash player or a media player.
It's quite simple really, http://www.thehits.net is the site I am developing and I will tell you how it works.
Firstly, my best bet is if you are going to open a internet station is to get yourself licensed with PPL and PRS For Music, do a google search on them, without licensing from then you can be liable for a fine.
Secondly, you will need a server to run your station from, which you probably already know, my best solution is to visit http://www.citrus3.com and get yourself a shoutcast server, they are the most reliable and reasonably cheap!
Then you will need to build your website, so that the listener's have something to look at, because a website with just a radio player is not very friendly and would certainly not look good for SEO and your listeners.
Next you need to create your ASX file which will hold the stream information.
Save this as player.asx
You will then need to embed the ASX file into a webpage for a user to view and listen to your content, just add this anywhere in html. Make sure you use echo'YOUR CODE HERE'; if you are using PHP.
That's it your all done, now you need to find a way to broadcast your music, if you go to http://www.spacialaudio.com they have a program called SAM Broadcaster which most online internet stations use.
You have to purchase it but there's a free trial version available, then download that, at the top will be "Desktop A", "Desktop B" and "Desktop C", go to "Desktop B" and where the encoder's box is, click on the little "+" sign and add in your details. You then click okay and click the "|>" button (play button) and it will start to stream, you then go back to "Desktop A" and put your music in the player's, make sure you load your music into the queue to be able to locate and play it quickly..
I hope I explained this in as much detail as I could to you, don't hesitate to PM me if you need any more information regarding this topic.
-BlakeRey.
It's quite simple really, http://www.thehits.net is the site I am developing and I will tell you how it works.
Firstly, my best bet is if you are going to open a internet station is to get yourself licensed with PPL and PRS For Music, do a google search on them, without licensing from then you can be liable for a fine.
Secondly, you will need a server to run your station from, which you probably already know, my best solution is to visit http://www.citrus3.com and get yourself a shoutcast server, they are the most reliable and reasonably cheap!
Then you will need to build your website, so that the listener's have something to look at, because a website with just a radio player is not very friendly and would certainly not look good for SEO and your listeners.
Next you need to create your ASX file which will hold the stream information.
<Asx Version = "3.0" > // This is the version of the ASX, normally the latest version. <Title >Your player name..</Title> // This is your player name or your radio station's name. <Param Name = "AllowShuffle" Value = "yes" /> // This is not needed but best to be here anyway. <Entry> <Duration value = "00:00:0.000" /> // This is the duration of the stream, keep it at 00:00:0.000 for everlasting. <Param Name = "Bitrate" Value = "128000" /> // This is the bitrate on how fast the stream will stream back the music/content to the viewers. This is set to 128kb/s <Param Name = "FileSize" Value = "0" /> // This is the filesize of the stream, yet again keep it at 0. <Param Name = "Is_Protected" Value = "False" /> // This is information for the ASX file. No need to edit. <Param Name = "Is_Trusted" Value = "false" /> // This is information for the ASX file. No need to edit. <Param Name = "IsVBR" Value = "False" /> // This is information for the ASX file. No need to edit. <Param Name = "MediaType" Value = "audio" /> // This is what your media type is, as for a radio station it would be audio. <Param Name = "SourceURL" Value = "http://YOUSERVER.CITRUS3.COM:8000" /> // This is the source URL of where to listen for the music and then repeat it back. <Param Name = "Streams" Value = "audio" /> // This again is what your media type is, leave this at audio for music. <Title >Stream title..</Title> // This is the title of your stream, like 101.3 DreamInCode FM <Param Name = "type" Value = "downloaded" /> <Param Name = "WM/Genre" Value = "Various" /> // This is the genre of your music, like pop/r+b/reggae etc.. <Ref href = "http://YOUSERVER.CITRUS3.COM:8000" /> // This is the reference URL to where you stream is coming from (like SourceURL) </Entry> </Asx>
Save this as player.asx
You will then need to embed the ASX file into a webpage for a user to view and listen to your content, just add this anywhere in html. Make sure you use echo'YOUR CODE HERE'; if you are using PHP.
<object id="MediaPlayer" /The object type width=640 // The width of your player height=480 classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Windows Media Player components..." type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112"> <param name="filename" value="player.asx"> <param name="Showcontrols" value="True"> <param name="autoStart" value="FALSE"> <embed type="application/x-mplayer2" src="player.asx" width=640 height=480> // Your ASX file URL and the width/height of the player. </embed> </object>
That's it your all done, now you need to find a way to broadcast your music, if you go to http://www.spacialaudio.com they have a program called SAM Broadcaster which most online internet stations use.
You have to purchase it but there's a free trial version available, then download that, at the top will be "Desktop A", "Desktop B" and "Desktop C", go to "Desktop B" and where the encoder's box is, click on the little "+" sign and add in your details. You then click okay and click the "|>" button (play button) and it will start to stream, you then go back to "Desktop A" and put your music in the player's, make sure you load your music into the queue to be able to locate and play it quickly..
I hope I explained this in as much detail as I could to you, don't hesitate to PM me if you need any more information regarding this topic.
-BlakeRey.
This post has been edited by BlakeRey: 05 April 2010 - 07:45 PM
#8
Re: internet radio advice
Posted 06 April 2010 - 09:39 AM
Hi BlakeRey,
Thank you very much for taking the time to explain this, its a great help.
i had not come across ASX files before, although i had seen this markup used on some of the other sites i was looking at last week and was unsure what it was.
ill will let you know how i get on
Thanks again.
Thank you very much for taking the time to explain this, its a great help.
i had not come across ASX files before, although i had seen this markup used on some of the other sites i was looking at last week and was unsure what it was.
ill will let you know how i get on
Thanks again.
#9
Re: internet radio advice
Posted 25 May 2010 - 04:31 PM
lonepixel, I am just curious on how you are doing with it, I am glad the information I provided was a great help to you, and if you need to know more, don't hesitate to ask.
#10
Re: internet radio advice
Posted 02 June 2010 - 01:03 PM
If you have a time you can look at this link. Click Here !
Mabye you find something useful and interesting from there.
Mabye you find something useful and interesting from there.
#11
Re: internet radio advice
Posted 03 June 2010 - 05:06 AM
Hi guys, sorry for the late response. Been a hectic few weeks, with working on a couple of projects side by side.
I got a little further with the internet radio player. I also got some advice from the flash forum as it started to look like flash might be my best bet for the functionality I was after.
a couple of pre-built players were mentioned which I took a look at.
wimpy mp3 and JW player.
I have started using JW player and so far it seems like it will do what i need. The Javascript script api gives me the ability to build my own custom play and skip buttons very easily. I can also build a play list of the stations I will need to link to as well. This can be done both with JW players built in play list as well as using html links.
The only problem at the moment is with JW player and firefox which seems to get stuck at the start of the stream until it is either skipped in using the time line slider or paused and then replayed. Hoping to get this resolved by next week, it runs great in all the other browsers I have tried.
Thanks again for the advice BlakeRey, I will post back if I have more questions and thank you qtex for the link I will have a read over the page tonight.
these are the links for jw player in case there of some use to anyone, its open source and free for non-commercial use with a charge for a commercial license.
http://www.longtailvideo.com/
http://www.longtailvideo.com/support/
I got a little further with the internet radio player. I also got some advice from the flash forum as it started to look like flash might be my best bet for the functionality I was after.
a couple of pre-built players were mentioned which I took a look at.
wimpy mp3 and JW player.
I have started using JW player and so far it seems like it will do what i need. The Javascript script api gives me the ability to build my own custom play and skip buttons very easily. I can also build a play list of the stations I will need to link to as well. This can be done both with JW players built in play list as well as using html links.
The only problem at the moment is with JW player and firefox which seems to get stuck at the start of the stream until it is either skipped in using the time line slider or paused and then replayed. Hoping to get this resolved by next week, it runs great in all the other browsers I have tried.
Thanks again for the advice BlakeRey, I will post back if I have more questions and thank you qtex for the link I will have a read over the page tonight.
these are the links for jw player in case there of some use to anyone, its open source and free for non-commercial use with a charge for a commercial license.
http://www.longtailvideo.com/
http://www.longtailvideo.com/support/
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote






|