Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Streaming audio using m3u playlist file

Reply
Thread Tools

Streaming audio using m3u playlist file

 
 
Barry Koopersmith
Guest
Posts: n/a
 
      08-21-2005
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/aud..._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.
 
Reply With Quote
 
 
 
 
Roy Schestowitz
Guest
Posts: n/a
 
      08-21-2005
On Sunday 21 August 2005 04:46, Barry Koopersmith wrote:

> 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/aud..._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

--
Roy S. Schestowitz "Signature pending approval"
http://Schestowitz.com
 
Reply With Quote
 
 
 
 
Spartanicus
Guest
Posts: n/a
 
      08-21-2005
Barry Koopersmith <> wrote:

><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?

--
Spartanicus
 
Reply With Quote
 
Greg N.
Guest
Posts: n/a
 
      08-21-2005
Roy Schestowitz wrote:

> 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.


--
Gregor's Motorradreisen:
http://hothaus.de/greg-tour/
 
Reply With Quote
 
Barry Koopersmith
Guest
Posts: n/a
 
      08-21-2005
Roy Schestowitz wrote:
> On Sunday 21 August 2005 04:46, Barry Koopersmith wrote:
>
>>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/aud..._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
>

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)?
 
Reply With Quote
 
Barry Koopersmith
Guest
Posts: n/a
 
      08-21-2005
Spartanicus wrote:

> Barry Koopersmith <> wrote:
>
>
>><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?


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

http://thefireandreason.irbl.net/aud..._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)?
 
Reply With Quote
 
Roy Schestowitz
Guest
Posts: n/a
 
      08-21-2005
On Sunday 21 August 2005 16:40, Barry Koopersmith wrote:

> Roy Schestowitz wrote:
>> On Sunday 21 August 2005 04:46, Barry Koopersmith wrote:
>>
>>>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/aud..._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
>>

> 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

--
Roy S. Schestowitz "Beauty is in the eye of the beerholder"
http://Schestowitz.com
 
Reply With Quote
 
cwdjrxyz@yahoo.com
Guest
Posts: n/a
 
      08-21-2005

Barry Koopersmith wrote:
> Spartanicus wrote:
>
> > Barry Koopersmith <> wrote:
> >
> >
> >><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?

>
> When WinAmp pops up after clicking the link on this webpage:
>
> http://thefireandreason.irbl.net/aud..._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.

 
Reply With Quote
 
Spartanicus
Guest
Posts: n/a
 
      08-21-2005
Barry Koopersmith <> wrote:

>> 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/aud..._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.

--
Spartanicus
 
Reply With Quote
 
Spartanicus
Guest
Posts: n/a
 
      08-21-2005
Roy Schestowitz <> wrote:

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


>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.

--
Spartanicus
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
streaming audio with .m3u Jack Jarmush HTML 1 08-21-2009 04:31 PM
stiff dicks stilesproject streaming media host streaming mediasolutions streaming media funduk Java 0 11-04-2008 12:35 PM
m3u and MP3 files ? now choppy audio... paul814@excite.com Computer Support 4 10-01-2007 07:35 PM
m3u not working with FF MD Firefox 1 10-19-2004 03:43 PM
Re: p3p and inline files like M3U Daniel Doman HTML 0 07-26-2003 07:36 PM



Advertisments