Add Streaming Audio and Video


Putting audio and video on your site presents a number of problems, the most serious is download time. Even short clips can result in fairly large file sizes. For example, the four-second clip used early in this chapter still came out to almost 100K. That’s twice the recommended size for your entire page.

You can see how audio and video can slow your site down significantly. What is the solution? Streaming media. With streaming media your visitors can watch or listen to your files as they download. Are streaming files difficult to create? Not at all. Expensive? Definitely not. (Some of the best software for creating streaming media is freeware.)

What is the downside, then? Primarily that your Web host must be able to support streaming media, and not all currently do. If you spend a little money and invest in Apple’s QuickTime Pro, you don’t even have to worry about that. In any case, you shouldn’t have to search long to find a server that supports streaming audio and video. With its increase in popularity, more and more Web hosts are upgrading their services to support streaming media.

If you want to provide streaming content on your site, a program such as Helix Producer 9 enables you to create the files you need. You can record your own sound with a microphone, plugged directly into your sound card. You can also input an audio through the sound card’s line input jack with a CD, cassette, or even record player. If you have a video capture card, you can do the same with video input. After you have recorded your file, Helix Producer 9 converts it into a special format that is suitable for streaming. It even creates a special Web page to serve as the link to your streaming file. The wizards built in to the program enable you to easily and quickly create streaming audio or video files. When you save the file, the program uses the .rm extension, marking them out as RealMedia files.

When you have created your files and uploaded them to your Web server, you need to put a special link into your page to help it find the file. This is similar to linking to an external audio or video file, with one exception: You must create a special document and link to it. The document (also known as a metafile) serves as a pointer, directing the browser to your streaming file. Just create a blank file in Notepad or another text editor and type in the full URL for the file you are going to link to.

For example, say you converted video of your Hawaii vacation to RealVideo and saved it as hawaii_trip.rm. When it’s uploaded to your server, the URL might be something such as http:// www.cheapinternethost.com/hawaii_trip.rm. You simply type that line—and nothing elseinto your text file and save it with a .ram extension—the filename could be hawaii.ram. Then simply link to the .ram file. When visitors click it, their browsers will launch a special “plug-in” that plays a streaming video of you enjoying Hawaii’s sun and surf. The following code demonstrates how such a link might look:

<html>    <head>       <title>Streaming Video</title>    </head>    <body>       <a href="hawaii.ram">Check out          my Hawaiian vacation</a>    </body> </html>

Streaming media is the way to go if you plan to use a lot of audio and video files on your site. However, be sure that you have plenty of storage space on your Web server. Those files are large, and if you have very many, you might find yourself running out of storage space.




How to Do Everything with HTML & XHTML
How to Do Everything with HTML & XHTML
ISBN: 0072231297
EAN: 2147483647
Year: 2003
Pages: 126

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net