HTMLGoodies
The ultimate html resource
Earthweb.com


About the Double-Underlined Links



Search Clipart.com:



internet.commerce
Condos For Sale
Shop
Web Hosting Directory
KVM over IP
Logo Design Custom
Hurricane Shutters
Home Improvement
Computer Hardware
Calling Cards
Imprinted Gifts
Online Education
Promotional Products
Memory Upgrades
Car Donations

HTML Goodies : HTML and Graphics Tutorials : Getting Started Tutorial: So You Want Real Audio, Huh?

Just because Web sites are easy to build these days, that doesn't mean it's easy to build a quality Web site that meets your business objectives.

Before developing your next Web site, or redesigning an existing site, download this Internet.com eBook to guide you through the process and plan your project, whether you're developing a site in-house or outsourcing the project.
Register now for your free Internet.com membership to download your complimentary eBook. Membership will also give you access to:

eBook library         Whitepapers         Webcasts
Newsletters         WinDrivers

HTML GOODIES TO GO NEWSLETTER


Other Related Newsletters

Serve your customers, not your servers, with VERIO FreeBSD VPS. Click here for your full-access, test-drive.

So You Want Real Audio, Huh?


By Joe Burns

...use these to jump around or read it all
[How RealAudio Works]
[RealAudio From Your Site]
[Offering the RealAudio File]
[Creating the RealAudio Sound File]
[Creating the Meta File]
[The HTML Document]
[What's the Down Side?]

Hear Me Speak - Click Below

     I have up a couple of other tutorials dealing with sounds on the net. I have one on embedding MIDI and other formats of sound, and I have one on using the Meta Refresh dynamic commands for playing different formats. I have stayed away from RealAudio mainly because, in the past, RealAudio couldn't be done straight off of a WWW server. You needed a RealAudio server to run the format.


How Real Audio Works

     The process of RealAudio was explained to me by two different Internet server tech people. (These guys know words that don't exist in any language). After they explained for a good 15 minutes, they stopped, noticed I had completely glazed over, and decided to give it to me in simple terms. Note that the process is much more involved than this, but here's the general idea...

     If you put a sound on your WWW page, say a .wav or a midi. You are using what is known as a "helper application" or a "plug in." Either way - you are calling on another piece of software other than the browser itself to play the sound. The problem with that was that it took some time because the entire file has to download - then be loaded into the helper application - then it could play. Depending on download speeds, net congestion, file size, and your modem speed, this could take a long long time.
     Where RealAudio beat them all was that it played the sounds almost instantaneously. It amazed me the first time I heard it and saw it work. If you did what I did, you went to the RealAudio site, didn't bother to read any of the documentation, grabbed the RealAudio converter, and placed a few files on your server. Mine didn't work either.
     The reason it didn't work was because of downloading time and pace. For example, if you download an image file and sit there watching the numbers tick by in the status bar of your browser, you'll notice that the numbers are by no means consistent. You get a burst of data here and there, but there are also down times. You have to remember that you are not the only person being serviced by the system and that other people need the file too. That's the down time - while others are being helped.
     RealAudio works by creating a buffer, or specific connection, between your computer and a RealAudio server. Once the connection is established, the transfer of data is consistent and at a set pace, usually the pace of your modem. That way the file can be played as it is being downloaded. But the pace is the key here. HTTP servers don't offer the pace the RealAudio server does.

     But there has to be a way to play these things off of my site - you say.

     There is now! - I reply.


RealAudio From Your Site

     In order to run RealAudio sound files from your HTTP server, you're going to need a few things - luckily they're all free for the downloading. You'll need:

[The Real Audio Player version 3.0 or better]

[The Real Audio Sound Encoder]

[A RealAudio Meta File]
I'll show you how to make one of those.


Offering the RealAudio File

     First things first. If you're going to do this, your server must have two MIME type settings:

audio/x-pn-realaudio (files with a .ra or .ram file extension)
audio/x-pn-realaudio-plugin (files with a .rpm file extension)

     These settings are nothing that you can do yourself. You will need to contact your system's administrator and ask for the settings to be made. Most servers already have these settings, but it's best to check.
     What those settings are doing is telling the HTTP server than when you see a file with the extension .ra or .ram, load up the Real Audio server to play the sound.


Create the RealAudio Sound File

     You will use the RealAudio encoder to do this. If you haven't installed it on your computer yet, do it. It's rather simple to use. The hardest part is getting the .wav file to convert to RealAudio. That's the catch of this tutorial. You have to be able to make a sound file. Most newer computers have a microphone or a sound recorder program on them. Use it to make a file. Then open that file in the RealAudio encoder and encode it. You should now have a file with the same name as the original but with an ".ra" extension. That stands for RealAudio.

Creating the Meta File

     Now it gets a little tricky. If this was a simple .wav or MIDI file, you could just transfer it to your server and make an HREF link to it and it would play. Not so here. You need a buffer between the page and the RealAudio sound file. That buffer is the META file. Here's what you do:

  • Using a text editor, create a simple text file that only has the path to the RealAudio file on your server.

     For example, your file is called "joe.ra". You place it on your server named "http://www.server.com/~fred". Your Meta file will contain only this line of text:

http://www.server.com/~fred/joe.ra

     Don't use any html commands. Don't use any quote marks. Don't put anything else in the file other than the path to your RealAudio file. Just that.

     Now save the small text document with the extension ".ram". If you want to name to Meta file "joe", then save it as "joe.ram". Get it? Now you have your meta file ready to go.

     Transfer them both to your server. Make sure the sound file goes as binary.


The HTML Document

     Now it's time to call for the RealAudio file in a document. It would make sense that you would just make a link straight to the sounds file. Not so. In this case you make a link to the Meta file. Note! The Meta file only has the path to the RealAudio file inside of it.
     Remember above where you set the server setting so it related RealAudio with the .ram extension? Now that is coming into play. The process goes:

  • The HTML Document calls on the Meta file.
  • The call on the Meta file denotes to the server that a RealAudio file will be used here.
  • The RealAudio file begins a download.
  • The file starts playing after enough has downloaded to be read and understood.

     ...and off it goes.


So What's the Down Side?

     There are a few:

  • The viewer must have the RealAudio player 3.0 or better
  • If the MIME Settings are not correct, the text of the Meta file will display
  • The net may be congested so that the download is so sporadic that it won't work.

...but it's better than nothing as I always say.

[How RealAudio Works]
[RealAudio From Your Site]
[Offering the RealAudio File]
[Creating the RealAudio Sound File]
[Creating the Meta File]
[The HTML Document]
[What's the Down Side?]

Tools:
Add htmlgoodies.com to your favorites
Add htmlgoodies.com to your browser search box
IE 7 | Firefox 2.0 | Firefox 1.5.x
Receive news via our XML/RSS feed

IT Management Networking & Communications Web Development Hardware & Systems Software Development Earthwebnews.com



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
Microsoft Article: 7.0, Microsoft's Lucky Version?
Microsoft Article: Hyper-V--The Killer Feature in Windows Server 2008
Avaya Article: How to Feed Data into the Avaya Event Processor
Microsoft Article: Install What You Need with Windows Server 2008
HP eBook: Putting the Green into IT
Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 1
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 2--The Future of Concurrency
Avaya Article: Setting Up a SIP A/S Development Environment
IBM Article: How Cool Is Your Data Center?
Microsoft Article: Managing Virtual Machines with Microsoft System Center
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Video: Are Multi-core Processors Here to Stay?
On-Demand Webcast: Five Virtualization Trends to Watch
HP Video: Page Cost Calculator
Intel Video: APIs for Parallel Programming
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Sun Download: Solaris 8 Migration Assistant
Sybase Download: SQL Anywhere Developer Edition
Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
Red Gate Download: SQL Compare Pro 6
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
How-to-Article: Preparing for Hyper-Threading Technology and Dual Core Technology
eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
IBM Article: Collaborating in the High-Performance Workplace
HP Demo: StorageWorks EVA4400
Intel Featured Algorhythm: Intel Threading Building Blocks--The Pipeline Class
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES