Streaming audio using m3u playlist file

B

Barry Koopersmith

I created a webpage with this line of code:

<a href="Scenic-3songs.m3u">(streaming with WinAmp)</a>

The referenced "Scenic-3songs.m3u" file contains this one line:

http://www.thefireandreason.com/TFaRLive1.mp3

Here is the webpage:

http://thefireandreason.irbl.net/audio/TFaR_audio_streaming.htm

When I view the webpage in Mozilla Firefox, Netscape or Opera, when I
click on the link, it pops up the WinAmp mp3 player and it immediately
starts streaming and playing the referenced 11 mb size mp3 file. When I
view and click on the link in Internet Explorer (version 6.0), it pops
up the WinAmp mp3 player but it does not play the mp3 file. When I view
the html file locally on my computer in Internet Explorer and click on
the link, it pops up WinAmp and plays the mp3 immediately.

What code can I use that will stream the mp3 file in Internet Explorer
on the website (as well as the other web browsers)?

Thanks to anyone who can help me out.
 
R

Roy Schestowitz

I created a webpage with this line of code:

<a href="Scenic-3songs.m3u">(streaming with WinAmp)</a>

The referenced "Scenic-3songs.m3u" file contains this one line:

http://www.thefireandreason.com/TFaRLive1.mp3

Here is the webpage:

http://thefireandreason.irbl.net/audio/TFaR_audio_streaming.htm

When I view the webpage in Mozilla Firefox, Netscape or Opera, when I
click on the link, it pops up the WinAmp mp3 player and it immediately
starts streaming and playing the referenced 11 mb size mp3 file. When I
view and click on the link in Internet Explorer (version 6.0), it pops
up the WinAmp mp3 player but it does not play the mp3 file. When I view
the html file locally on my computer in Internet Explorer and click on
the link, it pops up WinAmp and plays the mp3 immediately.

What code can I use that will stream the mp3 file in Internet Explorer
on the website (as well as the other web browsers)?

Thanks to anyone who can help me out.

I suspect that you need to configure Internet Explorer to pass control to
Winamp differently. It's natural to imagine that winamp.exe is passed some
extra arguments that tell it how to handle the input file (e.g. enqueue,
play). To say it differently, I don't think you should be dealing with this
at source code level unless there is some M$-specific hack, which would not
be valid HTML. This still doesn't explain why you get a different behaviour
when viewing the page locally. Does the MP3 file reside locally as well? I
assume not.

Try to change your filetypes in Windows and see if the default application
for opening MP3 files gets assigned different behaviours depending on where
it comes from.

It is also worth mentioning that by embedding the URL's in an
application-specific (Winamp) format, you might peril users who use other
players. XMMS playlists, for example, are constructed differently.

Roy
 
S

Spartanicus

Barry Koopersmith said:
<a href="Scenic-3songs.m3u">(streaming with WinAmp)</a>

There are many media players capable of handling m3u/mp3 files, leave
that choice to the user, don't assume that they use the same player that
you use.
When I
view and click on the link in Internet Explorer (version 6.0), it pops
up the WinAmp mp3 player but it does not play the mp3 file.

What happens if you feed Winamp the url to the m3u or the mp3 file
direct?
 
G

Greg N.

Roy said:
It is also worth mentioning that by embedding the URL's in an
application-specific (Winamp) format, you might peril users who use other
players. XMMS playlists, for example, are constructed differently.

The format used is not app-specific. Presenting an MP3 file through an
M3U playlist should be handled without problem by every MP3 player on
the planet.
 
B

Barry Koopersmith

Roy said:
I suspect that you need to configure Internet Explorer to pass control to
Winamp differently. It's natural to imagine that winamp.exe is passed some
extra arguments that tell it how to handle the input file (e.g. enqueue,
play). To say it differently, I don't think you should be dealing with this
at source code level unless there is some M$-specific hack, which would not
be valid HTML. This still doesn't explain why you get a different behaviour
when viewing the page locally. Does the MP3 file reside locally as well? I
assume not.

Try to change your filetypes in Windows and see if the default application
for opening MP3 files gets assigned different behaviours depending on where
it comes from.

It is also worth mentioning that by embedding the URL's in an
application-specific (Winamp) format, you might peril users who use other
players. XMMS playlists, for example, are constructed differently.

Roy
Does the mp3 play in Internet Explorer if anybody else clicks that link?
Please let me know.

Is there a better method for streaming mp3 files on a webpage (so it
starts playing immediately instead of waiting until the entire file
downloads)?
 
B

Barry Koopersmith

Spartanicus said:
There are many media players capable of handling m3u/mp3 files, leave
that choice to the user, don't assume that they use the same player that
you use.




What happens if you feed Winamp the url to the m3u or the mp3 file
direct?

When WinAmp pops up after clicking the link on this webpage:

http://thefireandreason.irbl.net/audio/TFaR_audio_streaming.htm

if I then select "File-Play URL" and enter this URL:

http://www.thefireandreason.com/TFaRLive1.mp3

then it streams and immediately plays the mp3.

Doing the same by clicking the link on the html page located on my local
hard drive, it immediately plays the mp3 in WinAmp from that URL (it
passes the URL to WinAmp, I don't have to enter it manually).

Is this a problem using Internet Explorer only on my computer or do
other computers have the same problem?

Is there a better method (that will work in all web browsers and on all
computers) for streaming mp3 files on a webpage (so it starts playing
immediately instead of waiting until the entire file downloads)?
 
R

Roy Schestowitz

Does the mp3 play in Internet Explorer if anybody else clicks that link?
Please let me know.


I can't check at the moment as I have no access to a machine running
Windows, however...

Is there a better method for streaming mp3 files on a webpage (so it
starts playing immediately instead of waiting until the entire file
downloads)?


RealPlayer appear to play music immediately. Making an .rm or .ram version
wouldn't hurt if you have the conversion software already. Bear in mind, as
Spartanicus said:

"There are many media players capable of handling m3u/mp3 files, leave
that choice to the user, don't assume that they use the same player that
you use."

If I were to click a link to an MP3 file on your site, it would open up in
RealPlayer, which means it would not interfere with my current playlists in
XMMS. Never assume anything as regards the set preferences, application or
platform. I suggest you leave that to the user and worry less whether an
extra click is necessary or not. Add a gentle reminder to the visitor
saying that he/she might need to start the audio explicitly. When I click a
link to an MP3, I first get the choice as to whether I want it saved or
opened. The one click 'magic' can never be guaranteed.

Roy
 
C

cwdjrxyz

Barry said:
When WinAmp pops up after clicking the link on this webpage:

http://thefireandreason.irbl.net/audio/TFaR_audio_streaming.htm

if I then select "File-Play URL" and enter this URL:

http://www.thefireandreason.com/TFaRLive1.mp3

then it streams and immediately plays the mp3.

Doing the same by clicking the link on the html page located on my local
hard drive, it immediately plays the mp3 in WinAmp from that URL (it
passes the URL to WinAmp, I don't have to enter it manually).

Is this a problem using Internet Explorer only on my computer or do
other computers have the same problem?

Is there a better method (that will work in all web browsers and on all
computers) for streaming mp3 files on a webpage (so it starts playing
immediately instead of waiting until the entire file downloads)?

I tried your page on my computer that has 10 browsers installed and
uses the XP OS with all upgrades, including SP2. I have WMP 10, Real
10.5, QT, and Winamp players installed. I am set up for Winamp to play
MP3. Since all of the players will play MP3, you have to go into the
menus of all players and select or deselect mp3. However if you feed
the URL into , for example, the Real player directly, it is forced to
play the m3u linked file rather than Winamp. Some players are rather
aggressive for some formats and tend to steal formats from one another,
if you do not configure what each player will play in the player
menus.My results for your m3u link in your page are that the Winamp
pops up, there is a brief buffer time, and then the music starts
streaming just as is normal. It works on the IE6 family of browsers
IE6, MSN9, MyIE2, and Avant. It also works on the most recent versions
of Opera, Mozilla, Firefox, and Netscape. With this information, I
doubt if there is anything wrong with how you have the mp3 and m3u
files set up on your server, although it is always a good idea to check
if the correct mime types for each are installed on the server. If you
have other players, such as I do, you might go into the menus for all
of them, set to select mp3 and m3u(when offered) on the Winamp only,
and see what happens. In any event both mp3 and m3u should be selected
on the Winamp if you want it to be the main player for streamed mp3. I
have not tried it, but if you have mp3 selected on only one player and
m3u selected only on another player, there might be problems.

Such problems are not too unusual. For example, both the Real player
and Winamp will play mp4 audio. You can stream mp4 if you set the mime
types for it and a redirector file on the server. I could never get
this to stream on the Winamp. However if you use a .ram redirector file
for mp4, it streams well for me on the Real 10.5 player. I have been
able to stream Ogg Vorbis audio by setting the correct mime types on
the server, and Winamp works well on this if you install an Ogg plugin
on the Winamp.
 
S

Spartanicus

Barry Koopersmith said:
When WinAmp pops up after clicking the link on this webpage:

http://thefireandreason.irbl.net/audio/TFaR_audio_streaming.htm

if I then select "File-Play URL" and enter this URL:

http://www.thefireandreason.com/TFaRLive1.mp3

then it streams

It doesn't stream, feed a player a link to an mp3 and it will download
and play it.
and immediately plays the mp3.

You have a fast connection, or it's cached locally.
Doing the same by clicking the link on the html page located on my local
hard drive, it immediately plays the mp3 in WinAmp from that URL (it
passes the URL to WinAmp, I don't have to enter it manually).

You've not answered the question of what happens when you feed Winamp
the url to the remote m3u file.
Is this a problem using Internet Explorer only on my computer or do
other computers have the same problem?

You have no control over what happens on the client system, that's a
good thing. There may be a problem with your local system.
Is there a better method (that will work in all web browsers and on all
computers) for streaming mp3 files on a webpage (so it starts playing
immediately instead of waiting until the entire file downloads)?

Using m3u redirector files is the right approach.
 
S

Spartanicus

Bear in mind, as Spartanicus said:

"There are many media players capable of handling m3u/mp3 files, leave
that choice to the user, don't assume that they use the same player that
you use."

I think you may have misunderstood that, I was referring to the link
text.
 
G

Greg N.

Roy said:
RealPlayer appear to play music immediately. Making an .rm or .ram version
wouldn't hurt

Why?

I can think of reasons not to do that. The Real Media format (rm, ra) is
proprietary and quite obsolete. It can't do anything that MP3 can't do.
There is no UA in the world that can't handle MP3. Nobody needs the RA
format any more.

I can understand that media playback software continues to support it,
but why on earth should I provide new RA content?
 
B

Barry Koopersmith

Roy said:
I can't check at the moment as I have no access to a machine running
Windows, however...






RealPlayer appear to play music immediately. Making an .rm or .ram version
wouldn't hurt if you have the conversion software already. Bear in mind, as
Spartanicus said:

"There are many media players capable of handling m3u/mp3 files, leave
that choice to the user, don't assume that they use the same player that
you use."

If I were to click a link to an MP3 file on your site, it would open up in
RealPlayer, which means it would not interfere with my current playlists in
XMMS. Never assume anything as regards the set preferences, application or
platform. I suggest you leave that to the user and worry less whether an
extra click is necessary or not. Add a gentle reminder to the visitor
saying that he/she might need to start the audio explicitly. When I click a
link to an MP3, I first get the choice as to whether I want it saved or
opened. The one click 'magic' can never be guaranteed.

Roy

The first time you click on a file link of a particular file type,
Internet Explorer asks you if you want to open or save the file and you
have the option of checking the box if you want the answer remembered.
If someone selects "open", my goal is to have the large mp3 file
streamed so it plays immediately. It doesn't matter to me which player
the person uses to play it. When they click on the m3u, it is supposed
to call up whatever music player is assiciated with the m3u file type.
On my computer, it is WinAmp.

The problem is on my computer, all the different web browsers open the
default m3u music player but Internet Explorer (with a live webpage, not
from my local hard drive) is the only web browser that does not play the
mp3 (it open opens the music player but does not play the mp3). Even if
you click the "Play" button, it does not play. You have to type in the
complete URL of the mp3. Is this a problem only on my computer or a
problem using this code with Internet Explorer?

Is there a better method for streaming mp3 files on a webpage so if you
select the open to open the file and your default music player opens, it
starts playing immediately instead of waiting until the entire file
downloads with Internet Explorer and the other web browsers?
 
S

Spartanicus

Greg N. said:
Why?

I can think of reasons not to do that. The Real Media format (rm, ra) is
proprietary and quite obsolete. It can't do anything that MP3 can't do.
There is no UA in the world that can't handle MP3. Nobody needs the RA
format any more.

I can understand that media playback software continues to support it,
but why on earth should I provide new RA content?

Indeed, plus the proprietary nature of the rm format means that there
are only a few players capable of playing the content. If it wasn't for
reverse engineered illegal hacked software rm would only be playable in
that hopelessly crap RealMedia player.

MP3 on the other hand can be played by virtually all media players.

Offering RealMedia content should be avoided if possible.
 
C

cwdjrxyz

Spartanicus said:
Indeed, plus the proprietary nature of the rm format means that there
are only a few players capable of playing the content. If it wasn't for
reverse engineered illegal hacked software rm would only be playable in
that hopelessly crap RealMedia player.

MP3 on the other hand can be played by virtually all media players.

Offering RealMedia content should be avoided if possible.

For the reasons you mention, I agree offering a .rm only is a poor
choice. However the Real Player, in my opinion, is the best player out
there if you only have one player. It not only plays Real media but
also .wma and .wmv Windows media as well, to say nothing of mp3, mp4,
and many other media. On the other hand the WMP will not play Real
media. The Real player also supports SMIL2 which is an outstanding XML
language for media presentations.

Just to make certain the reported mp3 problem is not at the server,
play my song at http://www.cwdjr.net/mpg/Caruso1903.m3u . This has the
proper mime types set on the server for .mp3 and .m3u and is recorded
at a very low bit rate that even dialup can handle easily. If Barry's
Winamp does not pop up and start streaming this song at once, I think
we can be 99.999% certain his problem is with his computer
configuration and not with his server.

I would suggest a .wma along with the .wax redirector file if another
streaming format is desired. A .wma will play on the WMP, RA, QT, and
Winamp players, so most people who have a player at all would be able
to hear it streaming. It may be necessary to include a .ram redirector
file to get the .wma to stream on the Real player as Real often does
not like .wax, but I have not checked this out. In that case you would
just have click on 2 links, one for most players and one for the RA
player. Besides several pay programs that are available, Microsoft
offers the Windows Media Encoder for free. It will record both audio
and video, and is not very difficult to use. Of course there is nothing
to prevent you from offering a mp3 for download and a wma for
streaming.
 
G

Greg N.

For the reasons you mention, I agree offering a .rm only is a poor choice.

I still can't see why I should offer .rm at all.
However the Real Player, in my opinion, is the best player out there if you only have one player. It not only plays Real media but also .wma and .wmv Windows media as well, to say nothing of mp3, mp4, and many other media.

OK, it's the best there is, it handles everything, including MP3. So
why should I offer .ra?
 
C

cwdjrxyz

Greg said:
I still can't see why I should offer .rm at all.


OK, it's the best there is, it handles everything, including MP3. So
why should I offer .ra?

As I pointed out, you can get by without .rm even if you have only a
Real player, since it will play Windows media, and many other files
including mp3. However some may want to offer a .rm version of the song
in addition to a .mpg and/or .wma file. The main reason some might want
to do this is because they like Real better, do not like Microsoft, do
not like mp3, etc. - all matters of personal taste. I find it no
problem to offer up to 3 formats of a song. Most people will play only
one version of your song, so having 3 formats from which to select
should not increase your bandwidth usage much. Real has a free encoder
also, so it is not much of a problem to include a .rm version of a song
or video if you wish.
 
B

Barry Koopersmith

For the reasons you mention, I agree offering a .rm only is a poor
choice. However the Real Player, in my opinion, is the best player out
there if you only have one player. It not only plays Real media but
also .wma and .wmv Windows media as well, to say nothing of mp3, mp4,
and many other media. On the other hand the WMP will not play Real
media. The Real player also supports SMIL2 which is an outstanding XML
language for media presentations.

Just to make certain the reported mp3 problem is not at the server,
play my song at http://www.cwdjr.net/mpg/Caruso1903.m3u . This has the
proper mime types set on the server for .mp3 and .m3u and is recorded
at a very low bit rate that even dialup can handle easily. If Barry's
Winamp does not pop up and start streaming this song at once, I think
we can be 99.999% certain his problem is with his computer
configuration and not with his server.

I would suggest a .wma along with the .wax redirector file if another
streaming format is desired. A .wma will play on the WMP, RA, QT, and
Winamp players, so most people who have a player at all would be able
to hear it streaming. It may be necessary to include a .ram redirector
file to get the .wma to stream on the Real player as Real often does
not like .wax, but I have not checked this out. In that case you would
just have click on 2 links, one for most players and one for the RA
player. Besides several pay programs that are available, Microsoft
offers the Windows Media Encoder for free. It will record both audio
and video, and is not very difficult to use. Of course there is nothing
to prevent you from offering a mp3 for download and a wma for
streaming.

When I paste http://www.cwdjr.net/mpg/Caruso1903.m3u directly into the
IE Address box, it opens WinAmp and plays the mp3. When I paste
http://thefireandreason.irbl.net/audio/Scenic-3songs.m3u into the IE
Address box, it does not pop up WinAmp and I get an error message
stating "The requested site is either unavaiable or cannot be found". If
I paste it into any of the other web browsers, it pops up WinAmp and
plays the mp3.

Maybe my m3u file is the problem. It contains this one line:

http://www.thefireandreason.com/TFaRLive1.mp3

Please tell me the contents of your Caruso1903.m3u file.

Can you please give me a sample file of your suggestion to use a ".wma
along with the .wax redirector file if another streaming format is
desired" and "a .ram redirector file to get the .wma to stream on the
Real player" so I can see how to do this?
 
B

Barry Koopersmith

Spartanicus said:
It doesn't stream, feed a player a link to an mp3 and it will download
and play it.




You have a fast connection, or it's cached locally.




You've not answered the question of what happens when you feed Winamp
the url to the remote m3u file.




You have no control over what happens on the client system, that's a
good thing. There may be a problem with your local system.




Using m3u redirector files is the right approach.

I did answer the question of "what happens when you feed Winamp the url
to the remote m3u file". I said that if I enter the URL, it immediately
plays the mp3.

This is an 11 mb mp3 file. If I create a link to the mp3, the resulting
dialog box shows it downloading and completing the download before the
player pops up and plays it. A link to the mp3 can be found here:

http://www.thefireandreason.com/live.html

When I make the link using referring m3u file (which redirects to the
mp3), in the other non-IE web browsers, it immediately plays (no delays
while it downloads).

I agree that the using m3u redirector files is the right approach but
what do I need to do to get it to work in IE?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top