13.3. Posting a Movie on Your Own Web SitePosting movies on other people's Web pages is one thing. In many cases, however, you might prefer the control and the freedom of putting movies onto your own Web page, designed the way you like it. You'll quickly discover that this process is more technical than the ones described so far in this chapter. For example, the following discussion assumes that you do, in fact, already have a Web site. 13.3.1. Playing the Movie in its Own WindowIf you have a Web page, you're probably already familiar with the notion of FTP (file transfer protocol), the method you use to deposit new Web pages, graphics, and other elements onto your Web site. You do this using a program like Captain FTP or RBrowser, both of which are available for download from the "Missing CD" page at www.missingmanuals.com. 13.3.1.1 Setting up streaming playbackQuickTime provides a feature called Fast Start, which means that when a Web page visitor clicks your movie, he can begin to watch it before it's downloaded in its entirety. His copy of QuickTime estimates when enough movie data has been downloaded so that the whole movie can play without having to pause for additional data. The effect is a lot like the streaming video feature described earlier, except that there's a considerable pause as the first portion of the movie is downloaded. (On the other hand, you save thousands of dollars on the cost of specialized hardware and software that's required for a true streaming-video system.) To take advantage of this feature, use the Expert Settings dialog box when you're creating your QuickTime movie from the iMovie project. As shown in Figure 12-5 (in the previous chapter), iMovie offers a checkbox called "Prepare for Internet Streaming." If you turn on this checkbox and choose Fast Start from the pop-up menu, iMovie automatically encodes some extra instructions into the resulting QuickTime file that permit your movie to do this "fast starting" when played back from your Web page. 13.3.1.2 Playing your movieOnce you've uploaded your iMovie, youand everyone else on the Internetcan watch it just by typing in the correct address. If your Web site's usual address is www.imovienut.com, and the name of your movie file is mymovie.mov, then the URL (address) for your new movie is www.imovienut.com/mymovie.mov. (If you placed it into a folder within your Web site listingcalled flicks, for examplethen the address is www.imovienut.com/flicks/mymovie.mov.)
Tip: Mac and Windows computers consider capital and lowercase letters equivalent in Web addresses like these. The Unix machines that dish out Web pages by the millions, however, don't. Therefore, using only lowercase letters is a good precaution to avoid subjecting your visitors to "Web page not found" messages. If one of your fans types this address into the Web browser or clicks a link that goes to this address, one of three things happens:
13.3.1.3 Creating alternate versionsIf your Web hosting service makes enough hard drive space available, consider creating an alternate version of your movie for viewers who don't have the QuickTime plug-in. For example, the Windows equivalent of QuickTime is called the AVI format. Using QuickTime Player Pro, described in the next chapter, you can convert your movie into an AVI file, which you can post on your Web page exactly the same way you posted the QuickTime movie. Then you can put two different links on your Web page: "Click here for the QuickTime version (Mac users)," and "Click here for the AVI version (Windows users)." Of course, your Windows visitors won't enjoy the quicker gratification of the Fast Start feature provided by QuickTime. But you'll save them the trouble of having to download and install a special plug-in. (Creating a very tiny movieno larger than 160 x 120 pixels, for exampleis especially important when saving in AVI format. Thanks to the lack of the Fast Start feature, Windows users who don't use the QuickTime plug-in must wait for the entire movie to download before they can begin watching it.) 13.3.1.4 The HTML codeIf you'd like to make the presentation of your movie a little bit more elegant, you can use the sample HTML code listed here as a template. Even if you've never programmed in the HTML language, you can simply type these codes anywhere fine Web pages are writtenin Dreamweaver, BBEdit, or whatever program you use to make your Web pages. In a pinch , you can type the following directly into TextEdit and then drag the resulting document into your Web space exactly as shown in Figure 13-4. (Of course, you should change the italicized text to match the actual address and name of your movie.) <HTML> <HEAD> <TITLE> Watch my iMovie here!</TITLE> </HEAD> <BODY> <P> Click <A HREF="http://www.myserver.com/foldername/mymovie.mov">here</A> to watch my iMovie!</P> <P>You'll need the free QuickTime plug-in to watch my movie in your browser. You can also download it to your hard disk and watch it with the free QuickTime Player.</P> <P>You can get the QuickTime plug-in and QuickTime Player for Mac and Windows at <A> HREF="http://www.apple.com/quicktime"> http://www.apple.com/quicktime</A>. </P> <P>Thanks for watching!</P </BODY> </HTML> 13.3.2. Embedding the Movie in Your Web PageIn the previous section, you read about how to create a link that makes your movie pop up in a separate window. But the really smooth operators on the Internet scoff at such an amateur hack. It's far more elegant to create a movie that plays in place, directly on your Web pageno pop-up window necessary. Doing so requires yet further immersion in the HTML programming languagebut only up to your ankles. If you're not afraid, proceed: 13.3.2.1 The <embed> commandCreating this effect requires a few more lines of HTML code. One of them is the <embed> tag, which instructs your visitor's Web browser on how to handle media types it doesn't ordinarily know how to display (in this case, a QuickTime file). It can learn to understand QuickTime movies, however, either by relying on a helper application or a plug-in. Following the <embed> tag, you'll want to type in a variety of < embed > tag attributes, additional HTML commands that give the browser further instructions on formatting and displaying the file. And that used to be all there was to it. A couple of years ago, though, Microsoft pulled a switcheroo in the way it wrote its flagship Web browser, Internet Explorer. The result: millions of QuickTime movies on the Web didn't show up correctly in versions 5.5 or 6 of Internet Explorer for Windows. The following blob of code solves the problem. It embeds the movie on your page in such a way that the ugly "broken plug-in" icon will never appear, even for those long-suffering Windows users. (If they don't have a version of QuickTime that will work seamlessly, they'll see a message that offers to download and install the latest QuickTime software automatically, without having to close their browsers.) <OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="240"HEIGHT="196" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab"> <PARAM name="SRC" VALUE="mymovie.mov"> <PARAM name="AUTOPLAY" VALUE="true"> <PARAM name="CONTROLLER" VALUE="false"> <EMBED SRC="mymovie.mov" WIDTH="240" HEIGHT="196" AUTOPLAY="true" CONTROLLER="false" PLUGINSPAGE="http://www. apple.com/quicktime/download/"> </EMBED> </OBJECT> Here's what each line means:
13.3.2.2 More <embed> tag attributesIf you're kind of getting into this, here are a few more commands you can use to tweak the way your movie is presented:
This attribute works in conjunction with the <HREF> attribute, like this: <HREF="mymovie.mov" TARGET=QUICKTIMEPLAYER> 13.3.2.3 Making a poster movieUsing the <embed> tag in conjunction with the QuickTime plug-in is great, because it lets you embed a movie directly into your Web page. Trouble is, the data for your entire movie starts downloading to your visitors' Web browsers the instant they arrive at your page. (This downloading takes place even if you turned off the Autoplay option. It's true that the movie won't start playing instantly, but the data will nonetheless begin transferring, so that the movie will be ready to play when your visitor does click the Play button.) This automatic downloading could annoy your visitors, both because it slows their Web browsers down substantially, and because some people have wireless connections where they're charged by the amount of data transferred. If your movie file is on the hefty side, or if you've got more than one movie on the Web page, this kind of unsolicited data-ramming could infuriate your visitors.
You can solve this problem easily enough by creating a poster movie, a separate movie file that contains only one single picture (see Figure 13-6). Rather than embedding the actual movie in your Web page, you can embed this poster movie, turning it into a button that downloads the real movie file when clicked. This arrangement gives your viewers the ability to look over the Web page before deciding whether or not to download the movie in its entirety. To make a poster movie, you can use a still image from the original iMovie file. (See Chapter 9 for instructions on exporting a single frame from your movie as a JPEG file.) Actually, any old graphic image will do, such as a JPEG or GIF file, as long as it's the right size (see page 249). Note: In the following steps, you'll turn this still picture into a one-frame movie. The explanation is technical, but juicy: By turning a tiny QuickTime movie (instead of a plain JPEG or GIF file) into a poster frame, you'll force your visitors' QuickTime movie-playing plug-in to become activated as soon as they arrive at your Web page. When they then click your poster frame, the actual movie will begin playing promptly, having already loaded the QuickTime plug-in.
So far, so goodyou've got a poster movie frame on your hard drive. Now you need to embed this new poster movie into your Web page. The process resembles the one where you embedded the movie into the Web page, but this time, you'll need a couple of additional commands: <EMBED SRC="movieposter.mov" WIDTH=240 HEIGHT=180 AUTOPLAY=TRUE CONTROLLER=FALSE LOOP=false HREF="mymovie.mov" TARGET="myself" PLUGINSPAGE="http://www.apple.com/quicktime/"> First, note that the <controller> attribute is set to false. Since the movie frame is just a single still picture, having a scroll bar underneath it would confuse the heck out of your visitorsand it wouldn't even work. Without the controller bar, the poster movie appears as a still image, as it should. The attribute <HREF="mymovie.mov"> tells the browser that as soon as the visitor clicks the poster-movie image, the browser should load the mymovie.mov file.
<TARGET="myself "> specifies that the new movie should load directly in place of the poster movie. Because the poster frame and the movie have the same <height> and <width> attributes, the movie will seamlessly appear where the poster frame used to be. Tip: As with any graphic on any Web page, you or your Web design software should remember to upload the newly created poster-frame graphic. You can use Captain FTP for this purpose, for example. |