A Digital Age Deserves A Digital Leader

Streaming MP3 files on a web page

Streaming MP3 files on a web page

Postby twhite56 » Thu Jan 15, 2004 1:04 am

Does anyone know the best way to stream or play mp3 files with start/stop capability on a web page? In some way that won't take terribly long to download?
Thanks
PROfessional Member
User avatar
Posts: 373
Joined: Sun Jan 11, 2004 12:24 am

Postby Injunfarian » Thu Jan 15, 2004 1:39 am

just use the embed tag or make a player in flash.
as for taking long time to download it all depends on what you want if you don't mind sacrificing quality then just use LAME or another Mp3 Encoder and reencode them to a lower bitrate like 24kbit or 64kbit etc.
<a href="http://www.secretsofwar.net/index.asp?referer=injunfarian" target=_blank>Good Webbased Game</a>

<a href="http://selectaz.com" target=_blank><img src="http://selectaz.com/popup/stats.php" border=0></a>
PRO Level 3
User avatar
Posts: 63
Joined: Sat Jan 18, 2003 8:15 pm

Postby twhite56 » Thu Jan 15, 2004 1:44 am

can a flash file load and play at the same time? if so do u know how to do this? do u have the actionscript code
PROfessional Member
User avatar
Posts: 373
Joined: Sun Jan 11, 2004 12:24 am

Postby Weaver » Thu Jan 15, 2004 2:08 am

I am no expert, but using JavaScript or a tiny Java applet would work quite well.

The simplest way, as mentioned above, would be to just use an embed tag.

-Weaver
Public Keys

The primary purpose of the DATA statement is to give names to constants; instead of referring to pi as 3.141592653589793 at every appearance, the variable PI can be given that value with a DATA statement and used instead of the longer form of the constant. This also simplifies modifying the program, should the value of pi change.
-- FORTRAN manual for Xerox Computers
PROfessional Member
User avatar
Posts: 1967
Joined: Wed Jun 19, 2002 12:05 am
Location: /home/weaver/

Postby Injunfarian » Thu Jan 15, 2004 3:04 am

yea flash can stream mp3 data but i don't have the code nor example cuz i never really messed with flash i just know it has the abilitie to do it.
<a href="http://www.secretsofwar.net/index.asp?referer=injunfarian" target=_blank>Good Webbased Game</a>

<a href="http://selectaz.com" target=_blank><img src="http://selectaz.com/popup/stats.php" border=0></a>
PRO Level 3
User avatar
Posts: 63
Joined: Sat Jan 18, 2003 8:15 pm

Postby Dalsim » Thu Jan 15, 2004 4:41 am

I am not too sure on the legality of this. If it is for a intranet it should be ok but if it is for the www and it is music then I would check.

Edit (Weaver): Removed double post.
"Life is merely a fraction of a second. An infinitely small amount of time to fulfill our desires, our dreams, our passions." Paul Gauguin (1848 - 1904)
AEST
PROfessional Member
Posts: 1119
Joined: Sun Jun 15, 2003 7:07 am
Location: Queensland, Australia

Postby twhite56 » Thu Jan 15, 2004 2:11 pm

No it's all original music, none of it is copyright. And also, even if the music was copyright, it would probly be covered under fair use. I just need the code for flash, i dunno how to stream. I'll check google if no one here has the answer
PROfessional Member
User avatar
Posts: 373
Joined: Sun Jan 11, 2004 12:24 am

Postby Dalsim » Thu Jan 15, 2004 2:17 pm

Do a google for "windows streaming media" the windows encoders are able to actually stream music across the net.
"Life is merely a fraction of a second. An infinitely small amount of time to fulfill our desires, our dreams, our passions." Paul Gauguin (1848 - 1904)
AEST
PROfessional Member
Posts: 1119
Joined: Sun Jun 15, 2003 7:07 am
Location: Queensland, Australia

Postby Weaver » Thu Jan 15, 2004 9:50 pm

windows encoders are able to actually stream music across the net.


That would only contribute to the machine, stay away from license style codecs. Most audio formats are "streamable" in the classical sense.

Hell even mp3 has restrictions, your best bet is to take the zero patent approach and use OGG Vorbis. Support is growing very rapidly, not only that but sound quality is better (IMHO) than mp3 at lower bitrates ( < 96 kbit/s).

I have actually stopped encoding into mp3. All audio that needs to be compressed is encoded using OGG Vorbis.

-Weaver
Public Keys

The primary purpose of the DATA statement is to give names to constants; instead of referring to pi as 3.141592653589793 at every appearance, the variable PI can be given that value with a DATA statement and used instead of the longer form of the constant. This also simplifies modifying the program, should the value of pi change.
-- FORTRAN manual for Xerox Computers
PROfessional Member
User avatar
Posts: 1967
Joined: Wed Jun 19, 2002 12:05 am
Location: /home/weaver/

Postby Injunfarian » Thu Jan 15, 2004 10:34 pm

yea i wish i could move from mp3 to ogg as well but i got mp3 player on my dvd and my car stereo so i am stuck with mp3 :(
<a href="http://www.secretsofwar.net/index.asp?referer=injunfarian" target=_blank>Good Webbased Game</a>

<a href="http://selectaz.com" target=_blank><img src="http://selectaz.com/popup/stats.php" border=0></a>
PRO Level 3
User avatar
Posts: 63
Joined: Sat Jan 18, 2003 8:15 pm

Next

Return to HTML, CSS, and Scripts

Who is online

Users browsing this forum: No registered users and 10 guests

cron
cron