.m3u file format?

Posted on

Member Since: May 09, 2004

I'm looking at redoing the music page on my site, www.soniclux.com/music.html , because of a couple complaints from users that the mp3s won't play for them. As of now, I'm linking directly to the mp3s.

I noticed that this site (HRC) utilized the .m3u format for streaming. Now, I know NOTHING about it. Anyone have any info on how this is done?

I was also thinking about finding a media player, maybe instead of .m3u, that I could put on the site. Maybe flash? If I go this route, it doesn't necessarily have to be free but I'd like it be affordable (< $40 if possible)

Thanks ahead,
Mike

[ Back to Top ]


Administrator
Since: Apr 03, 2002


Jan 30, 2005 04:34 pm

m3u is simple, it's just a plain text file, the only content in it is the URL to the mp3 file, and save the m3u as "whatever.m3u"

Member
Since: May 09, 2004


Jan 30, 2005 04:39 pm

Wow, that was quick! Thanks : )

That's really all there is to it? It's hard to beleive that little bit of text will stream a file. I'm gonna go try it.

Is there anything that I can add to the files? Maybe parameter adjustment or something like that?

Administrator
Since: Apr 03, 2002


Jan 30, 2005 04:42 pm

not that I am aware of, but you can list many file, all on different lines, and have a playlist.

I wouldn't really call it "streaming" in the truest sense of the word...but it's better...at HRC the m3u files have the php extension because the content is being dynamically generated from a database, so instead it's sending the m3u content-type header data to make sure the computer knows it's an m3u file, but in your case, a simple text file will do the job all by itself...

and yep, it's just that friggin easy...

See anyone can do this stuff... :-) Ain't no rocket science. ;-)

Member
Since: May 09, 2004


Jan 30, 2005 04:54 pm

hmm, didn't work for me. It just showed the text contents of the file in my browser. I uploaded in ASCII mode do you think that might be the problem?

What encoding should I use when I save the file? eg. ANSI, unicode, etc.


Administrator
Since: Apr 03, 2002


Jan 30, 2005 04:58 pm

I dunno, that weird, never seen it before, make sure your text editor didn't append a .txt on the end...that's a first for me, needs no special encoding or uploading mode...really very simple...

Member
Since: May 09, 2004


Jan 30, 2005 05:08 pm

Well here's a link to what I tried:

www.soniclux.com/thickerhifi.m3u

I used notepad and made sure to select 'All files' so there's no .txt suffix. I'll keep playing around post back if (or if not) I figure it out.


Member
Since: May 09, 2004


Jan 30, 2005 05:12 pm

OK, that's weird. The link I provided seems to work fine. But it doesn't if I manually type the url in the browser.

Looks like problem solved but the real test will be when I update my site.

Administrator
Since: Apr 03, 2002


Jan 30, 2005 05:16 pm

"I told the doctor it hurt when I did this, he said, well, then don't do that".

it worked fine for me.

Member
Since: May 09, 2004


Jan 30, 2005 05:28 pm

Cool, thanks for your help, dB

One last question, I noticed that it saves as a 'winamp playlist file' Does this mean that the user would have to have Winamp on there computer to play the file?

Administrator
Since: Apr 03, 2002


Jan 30, 2005 05:37 pm

It prolly says that because YOU have Winamp, on my PC it's associated with Windows Media Player, and my PC just says "M3U File" in the file type description.

Member
Since: May 09, 2004


Jan 30, 2005 05:53 pm

Ah! It all makes sense now. It opens via the users default media player. Looks like this will solve the accessibility issues I'm having. I know what I'll be doing tonight. More repetative updating, yay!

Administrator
Since: Apr 03, 2002


Jan 30, 2005 06:35 pm

For something more sexy, check out WimpyPlayer, both me and Coco use it.

www.wimpyplayer.com

Member
Since: May 09, 2004


Jan 30, 2005 07:14 pm

That's really cool, I think I may just do that.

Do you think it's possible to set it up that the user could browse the site, post on the forum, etc. while the music's playing? (without resorting to frames or opening the player in a new window)

I know I can do that easy with the .m3u but the wimpy player IS a bit prettier.

Administrator
Since: Apr 03, 2002


Jan 30, 2005 07:24 pm

Wimpy would have to open in another window. I worked a bit on using wimpy on HRC, but I have to contact the author and get a custom hack from him to use it...or find some other work around...I'll have to start on that again...

OK, back to business, no, it couldn't keep playing unless it's opened in a new window.

Member
Since: May 09, 2004


Jan 30, 2005 08:04 pm

Yeah, thats what I thought.

I'd like to see that on HRC, but I can see how it would get complicated on this type of site. Unless you just centralized it on the members music page but I'm sure whatever you have in mind is a bit more elegant than that!

I think I'm just gonna see how the m3u works out for now. I also want to include links to the mp3s for download. I think if I research JavaScript somewhat, I can find a way to create links to the mp3s that automatically generates a download prompt. That way the users don't have to know to right click and 'save target as'

Administrator
Since: Apr 03, 2002


Jan 30, 2005 08:06 pm

Well, to drive the individual pro member music pages, or the custom playlists, it's all pulling info from the database. The current Wimpy has a limited number of variables it can take for the options the author made. I need to be able to pass it more variables so it knows who is listening so it pulls the proper playlist.

I have the proper XML file being created for it, but Wimpy won't recognize it as such, so I need mods to the Wimpy...which will probably be another cost...argh...

Member
Since: May 09, 2004


Jan 30, 2005 08:24 pm

I sort of understand that, so your saying you can't pass Wimpy any variables until you pass Wimpy more money?

Aren't variables money anyway?

$mike_is_god
$lol
$the_almighty_dollar

Seriously though, best of luck on that. I hope those Wimpy folks aren't too variabl/ I mean, money hungry.

Administrator
Since: Apr 03, 2002


Jan 30, 2005 09:13 pm

actually, in php, variables are denoted by starting with a $, so, yes, I do have to pass them $variables

Member
Since: May 09, 2004


Jan 30, 2005 09:57 pm

I'm still trying to get this code to work:

<?php

$mikesmoney = $HTTP_POST_VARS['money']
$bookoobucks = "10,000,000 dollars"

while ($mikesmoney < $bookoobucks)
{
give $mikesmoney $bookoobucks
}
else
{
learn (this coding stuff)
}

?>

Administrator
Since: Apr 03, 2002


Jan 31, 2005 06:02 am

hehehehe

Member
Since: May 09, 2004


Jan 31, 2005 06:18 pm

Just to update...

I got those done last night, everything's 1000% better now (and MUCH faster). Thanks again!


Hello!
Member
Since: Jan 12, 2004


Feb 01, 2005 02:39 am

Nice one...I still recommend Wimpy tho if ye think aboot the looks etc.

Ye can skin it, with loadsa new skins and even sell your mp3s via paypal directly from wimpy - its soooo cool when ye nail it!

Aye - good find indeed dB. Its on ma Bad Martini site if ye wanna see it.

Good work Mike..yer sites improvin all the time.

Coco.

Related Forum Topics:



If you would like to participate in the forum discussions, feel free to register for your free membership.