A Digital Age Deserves A Digital Leader

Streaming MP3 files on a web page

Postby Infinityeye » Wed Feb 11, 2004 7:17 pm

What's the different bitween .ogg and mp3???
Is the size smaller???
Image
Yes, I've used the Pro-Networks Album!
PROfessional Member
User avatar
Posts: 1075
Joined: Tue Dec 30, 2003 9:11 pm
Location: The Netherlands

Postby augie » Wed Feb 11, 2004 11:10 pm

Bazzz wrote:What's the different bitween .ogg and mp3???
Is the size smaller???


It is smaller than MP3 with the same quality IMHO and is open source. One thing though, don't go converting your MP3s to ogg, as MP3 are already compressed using a different algorithm and you'll lose quality. More info here
Everything that irritates us about others can lead us to an understanding of ourselves. -- Carl Jung

eVGA X58 tri-SLI, i7 930 @ 3.8GHz., Corsair 6GB Dominator, Inno3D GTX470, eVGA260
ASUS P8P67 Pro, i7 2600K @4.60 GHz, 8GB RAM, eVGA GTX 460
Community Director
User avatar
Posts: 7870
Joined: Mon Aug 26, 2002 1:55 am
Location: Laurentians, Quebec

Postby Weaver » Wed Feb 11, 2004 11:41 pm

No, not necessarily "smaller than MP3" as there is only so much information that you can compress/remove from audio before it sounds bad. VBR MP3 and VBR OGG Vorbis at the same target bitrate are going to be essentially the same size (duh, same bitrate). However, OGG Vorbis generally sounds just as good or better than MP3 at comparative lower bitrates. For example, if you have a 128 kb/s MP3 stream and a 128 kb/s OGG Vorbis stream, there sizes are going to be the same but the OGG Vorbis stream may sound a little better.

At high bitrates, there really is no difference to the "perceived sound". Usually a properly ripped MP3 at VBR 192 kb/s is going to sound just as good as the original. The same goes for OGG Vorbis. However, at 96 kb/s, OGG Vorbis is going to sound better than MP3 at that same bitrate. This is all my own opinion as well as the opinion of others.

The other obvious difference is that the MP3 algorithm/encoding/decoding process is not patent free. It is not that one is open source or the other is not. LAME is an "open source" MP3 encoder. It is not the source, it is the algorithm involved.

OGG Vorbis is a patent free algorithm/encoding/decoding etc. The MP3 algorithm is patented by Fraunhoefer ( http://www.iis.fraunhofer.de/amm/techinf/layer3/ ). OGG Vorbis is not patented and actively developed by Xiph ( xiph.org ).

-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 Infinityeye » Sat Feb 14, 2004 12:45 pm

I understand now
Image
Yes, I've used the Pro-Networks Album!
PROfessional Member
User avatar
Posts: 1075
Joined: Tue Dec 30, 2003 9:11 pm
Location: The Netherlands

Postby shakib » Thu Mar 04, 2004 9:51 am

Personally I'd go the flash route, but you can in fact stream mp3's straight to someone's media player (e.g. winamp) simply by creating a playlist:
http://www.mickwood.com/articles/streaming.shtml


twhite56 wrote: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


You should probably go and rtfm on Flash and audio, or go over to http://www.ultrashock.com or somewhere for more help, but I'll see if I can get you going.

With flash you have two basic options for embedding sounds - as an "event" or a "stream". Event sounds will be preloaded completely by flash before beginning, whereas streaming sounds will play as they go.

Your best bet is to use the streaming option, but to do a bit of preloading/progressive downloading by hand to stop skips and the like. Your code for that bit might sit on the first frame of your movie and look something like this (assuming Flash Player 6 or higher):

Code: Select all
// set this to the name of your movieclip instance
// containing your sound stream:
soundMovie = my_mc;

// set to your idea of safe preload percentage:
safePercent = 20;

this.onEnterFrame = tick

function tick() {
  var l = soundMovie.getBytesLoaded();
  var t = soundMovie.getBytesTotal();
  var p = 100 * l / t;
  if ( p >= safePercent ) {
    soundMovie.play();
    delete this.onEnterFrame;
  } else {
    soundMovie.stop();
  }
}



note - that's untested sample code :). Go to ultrashock if you're really stuck and you might catch me there.
PRO New Member
Posts: 8
Joined: Wed Mar 03, 2004 1:56 pm

Postby stephenarts » Mon May 24, 2004 7:51 pm

Also... there is a difference between streaming and downloading. In order to stream, you must have a streaming server, such as windows media server (comes with most windows server 2003 packages). I personally favor the windows media direction, majorly because of the new features built into 9. I used windows media server with video, and it works great. It allows you to send a large amount of data at the beginning of the stream, so the user can start watching/hearing the a lot quicker than he/she normally would. There are also a lot of advanced features and security features as well. If you have any questions on windows media server, feel free to ask. Oh... the other way to distributing music is a normal download, in which the user is downloading the music as he/she is playing it. Streaming allows a more instantaneous play. The downside of streaming... the user can't keep the song. Ordinary downloads allow users to save the music for later listening, without going to the website.
PRO New Member
Posts: 3
Joined: Tue Apr 27, 2004 8:45 pm
Location: United States

Postby azzum » Wed May 26, 2004 1:07 am

Going back to the original question. I think flash is a great way to go. I use it all the time to stream mp3's on my site. Take a look at this page http://metasphere.net/help/FCS-1031.html it helped me out when I was starting with MP3's and Flash
PRO Level 2
Posts: 14
Joined: Sun May 23, 2004 6:49 pm
Location: Canada

Postby twhite56 » Wed May 26, 2004 2:27 am

Thanks guys, you gave this old thread some life. I'll look at the stuff you are talking about. Thanks again!!! :yesnod: :yesnod: :yesnod: ^*^ ^*^ ^*^ ^*^ :()
PROfessional Member
User avatar
Posts: 373
Joined: Sun Jan 11, 2004 12:24 am

Postby RyanD » Sat Jun 05, 2004 12:57 am

Yeah like some of they guys said reencode the files, i personally like the .ram by real so if you can get the real encoder software you could do that. another bonus is that .ram fils download and play pretty quick.
Mac OS X:
20'' iMac G5 - 1.8 GHZ - 1.25 GB RAM - 160GB HD

Windows XP:
2.66 GHZ P4 - 1 GB Ram - 2, 200 GB HD's
NVIDIA GeForce MX 240
PRO Level 3
User avatar
Posts: 73
Joined: Fri Jun 04, 2004 3:28 am
Location: Las Vegas

Postby Xstream » Sat Jun 05, 2004 2:22 am

thanks for the info guys, I need to stream some audio and some video files. any tips on video?
PROfessional Member
User avatar
Posts: 3477
Joined: Fri Mar 15, 2002 2:30 am
Location: USA

Previous

Return to HTML, CSS, and Scripts

Who is online

Users browsing this forum: No registered users and 0 guests