O'Reilly Book Excerpts: Digital Video Hacks

Editor's note: The possibilities for hacking digital video are endless, but if you want a good place to start, check out these six hacks below, along with 94 others in O'Reilly's Digital Video Hacks.

Create a Two-Column Script


Two-column scripts clearly separate the audio and video portions of a scene. This approach provides more detail to help during the preproduction and editing processes .

Most people have seen a script at some point in their lifetime, whether for a play, a television show, or a movie. These are the traditional form of script, or screenplay , which focus on dialogue. They make mere mention of the actions the actors should perform.

A two-column script focuses on both the dialogue of the scene and the specific shots to be used. The two-column format provides visual instructions, allowing directors, editors, and everyone else on the crew to know what should appear on screen. Two-column scripts can be created before or after shooting and are especially helpful when working on a documentary or reality-style project.

Understanding the Two-Column Concept

Dialogue in a traditional screenplay typically looks like this:


He cannot want the best.

That shall attend his love.


Heaven bless him! Farewell, Bertram.


Although you can envision this scene in your mind, it is difficult to ensure we all imagine the same setting. Storyboards are one method of communicating what you "see" in your mind [Hack #6]. A two-column script provides another method. The dialogue in the previous example might look like Table 1-1 in a two-column script.

Table 1-1. Dialog in a two-column script



TWO SHOT Lafeu is on a blue velvet couch and Countess is standing to his left.

Lafeu: He cannot want the best. That shall attend his love.

TRACKING SHOT Countess walks toward the door and leaves.

Countess: Heaven bless him! Farewell, Bertram.

As you can tell, there is more detailed information about the setting. But for this type of entertainment, a two-column script is probably more work than is necessary.

So, when should you use a two-column script? Well, there is no hard and fast rule, but if you do not have a script and you have captured your footage, a two-column script could become your most prized possession.

Setting Up a Two-Column Script

If you own Microsoft Word, setting up a two-column script is fairly straightforward:

  1. Create a new document.

  2. Choose Table → Insert → Table….

  3. For the number of columns, enter 2.

  4. For the number of rows, enter 10.

  5. Click OK.

After the table has been inserted into your document, you should enter the headings of Video in the first column and Audio in the second column.

Writing with a Two-Column Script

If you are writing your script before shooting your scene, you will want to include descriptions of any action to occur on screen. In addition to descriptions of action, you will want to include information about camera movements. This type of script can be tedious to write, but it will effectively communicate your vision to everyone working on the project.

When working on a documentary, or anytime you are attempting to weave a story after footage acquisition, a two-column script might become your only roadmap to successful completion. With such projects, it is important to note both the tape number[Hack #3] and timecode [Hack #48] of the footage you would like to use. A good set of tape logs[Hack #5] will also prove invaluable during this process. Table 1-2 shows an example of what a two-column script looks like, when including tape and timecode information.

Table 1-2. An example two-column script



DVH001 - 02:04:14

(voice-over - to be recorded)

David sitting at his computer, playing Solitaire.

Working aerial search and rescue takes years of training…

DVH032 - 00:25:15

DVH011 - 01:13:50

CU of walkie-talkie.

Air Five, we have a 920-Alpha at the Crest. Please respond.

DVH003 - 00:49:29

10-4. Responding now.

David running to his helicopter, speaking into the walkie-talkie.


(voice-over - to be recorded)

…and the ability to remain calm under pressure.

TIP: Don't worry about being frame-accurate with your scripts. Frame accuracy is important only during the editing process. The preceding script uses the HH:MM:SS timecode format.

The previous script has a few interesting items. In the first row, notice the video is from footage that has already been shot but the audio is coming from a voice-over, which has yet to be recorded. We know the voice-over has not been recorded, because there is no tape number and no timecode associated with it.

In the second row, the video is a close-up shot of a walkie-talkie and the audio is coming from a different tape. Since there is no visual cue to indicate what is being said over the walkie-talkie, I have chosen to use audio from another tape that I feel moves my story in the direction I would like to take it. In fact, the audio from tape DVH011 is background audio that was obtained by accident.

Rows four and five are of the subject, David, running toward his helicopter while speaking into his walkie-talkie. Again, the voice-over portion has not yet been recorded.

Editing with a Two-Column Script

If you are editing a project and you have a two-column script, your job is going to be a lot easier than without one. You are provided both the tape number and timecode of the audio or video you need, so most of your initial decisions will be made for you. The majority of your early work will require you to locate the most suitable out-point for your edits, and then you will just have to make your edits smooth [Hack #46]. For the most part, however, you should be able to concentrate on the storyline of the project.

After you have digitized your footage, you simply need to locate the referenced audio or video and add it to your timeline appropriately. As you move down your script, you will move to the right on your timeline, continually layering in the audio and video together. If you've ever worked with a lot of footage and no script, you'll love the focus a two-column script provides… not to mention the amount of time it saves.

Roll Your Own Dolly


A pair of wheels, and a way to roll around on them, can make a great dolly .

When attempting to capture a scene where your subjects are separated from the background, the camera needs to be moving. If you have ever tried to record footage while walking, you have probably noticed you get a very shaky shot. Your footage is probably the equivalent of step-shake-step-shake…

Most digital video cameras come with a feature to help stabilize your footage, which is especially useful for when you are standing in one place and holding the camera. When walking, however, you usually do not wind up with the shot you envisioned—even with the stabilization feature turned on.

Many professional camerapeople use a dolly to capture footage when they need to be moving. A dolly is basically a small, wheeled cart on which a cameraperson can sit while rolling along a given path. A variety of sporting goods, or even a wheelchair, can easily be substituted for the real thing.

Dusting Off Your Rollerblades

Many of us do not have the luxury of having a dolly, but we can make do with a pair of rollerblades and a trustworthy friend. Strapping on a pair of rollerblades and hitting the Record button on your video camera might seem like a simple feat, but there are a few caveats of which you should be aware.

TIP: Peter Smokler, an Emmy Award–winning cameraman, is known to throw on a pair of rollerblades, instead of using a dolly, to film some of his moving shots.

Trusting your friends.

If you plan on skating and shooting, think long and hard about where you will be concentrating. Looking through the eyepiece of your camera will greatly restrict your vision. Even looking at an LCD monitor will probably distract you from noticing any obstacles in your path. Figure 1-29 shows a cameraperson on rollerblades being pulled backward by an assistant.

figure Figure 1-29. Rollerblades serving as a great dolly

TIP: Skateboards, especially longboards, are good for low-angle shots. You can sit, lay, or simply attach the camera to one, in order to obtain the shot you want.

To be blunt, find a friend you can trust, and have her push, pull, and steer you around while you concentrate on the scene you are recording. Doing so will result in far fewer bruises, scraped knees, and broken bones. Whether you have a friend help you along, or you go it alone, make sure you use a broom and sweep the path you intend to take. A very small rock can cause a very big fall.

Moving backward

If your subjects are walking toward you, you will need to be skating away from them in order to keep them in frame and in focus. Because you will want to capture your subjects' faces, more often than not, you will be required to skate backward. Even though you will have your trusty friend pulling you from behind (you did read the previous paragraph, right?), you should be comfortable moving backward on skates.

Borrowing a Wheelchair

A wheelchair also makes a great dolly, because it is comfortable, stable, and requires no assembly. The use of a wheelchair as a dolly does not require much explanation: sit, point, shoot, and roll. As with rollerblades, it is best if you have someone push or pull you as you are shooting your scene.

WARNING You should avoid the temptation of a motorized wheelchair, because the motor's noise will most likely end up mixed in with your audio.

You will also find a wheelchair works especially well on more difficult surfaces, such as carpet, grass, and dirt.

Stealing from a Baby

If you have a child in the family, you more than likely also have a baby stroller. Depending on the type of stroller, you can alter it to hold your camera while you push the stroller along, recording your footage. Since each type and model of stroller is different, you will need to evaluate the situation to determine the best method to attach your camera. I have found jogging strollers to be the most versatile and easiest to work with. Figure 1-30 shows a Canon XL1 camera attached to a jogging stroller.

figure Figure 1-30. Using a jogging stroller as a dolly

There are a great number of other possibilities for creating your own dolly. Some people go so far as to create tracks out of PVC pipe to guide their dollies along a given path. Whatever your solution, you and your audience will appreciate the look a dolly shot provides.

Wrangle Your Music and Sound Library


Using Apple's iTunes, you can create a complete digital library of your music and sound effects.

With hundreds of millions songs sold through the iTunes Music Store and countless iPods in the hands of consumers, Apple's iTunes is a tremendous success. But the iTunes application (http://www.apple.com/itunes/download/; free), which runs on Macintosh and Windows systems, can be used for more than ripping and buying music. You can use it to organize your music and sound effects library, as well as keep track of what tracks you've used in your projects.

Organizing Your Audio

To organize your audio, import it into iTunes. Just load a CD into your computer and launch the application, if it doesn't launch automatically. More often than not, you will discover that someone has already entered the CD's information into CDDB (http://www.gracenote.com), which iTunes uses to automatically enter track names. Figure 5-8 shows a CD of household sound effects, with track information retrieved from CDDB.

figure Figure 5-8. Listing sound effects using iTunes

Although importing all of your music and sound effects in this manner can be time consuming, the amount of time you save on the back end is well worth it. This is because the columns in the iTunes window allow you to sort by Song, Genre, Time, and more. Additionally, your entire library can be searched.

Cataloging Your Audio

iTunes provides you the ability to add information, known as metadata, to your songs. Adding metadata to your songs allows you to catalog your audio in a more productive way. For example, there is no Sound Effects genre in iTunes, but you can add it as a Custom selection. Figure 5-9 shows the metadata, and some additions, for a group of tracks.

To change information for a track, or group of tracks, select the file and choose File → Get Info. If you have selected more than one track, iTunes will present a confirmation box to make sure you are not doing something unintended. You will then be able to change and add information for the selected tracks.

figure Figure 5-9. Adding information for a CD

TIP: The Comments column can be of particular use, especially if you have tracks with license restrictions. You might find it useful to display the Comments metadata in the main window by default (you can do so in the Edit → View Options… window).

Searching Your Audio

The advantage of using iTunes for your audio library is its search function. Some music and effects libraries contain thousands of tracks, so finding a particular track without iTunes can be time consuming and frustrating. Even if the library is organized well, and you have a good paper catalog, thumbing through it doesn't always prove to be the most effective use of time, because you still need to locate the CD and listen to the particular track to see if it matches what you are searching for.

Locating tracks.

Simply enter what you are looking for in the search box in the upper-right corner of the application window to search across all of the metadata for all of your tracks in your iTunes library. This functionality allows you to find songs or effects quickly. Additionally, if you've entered additional metadata, such as the cost of a song, you can find that as well by using the built-in search function. If you would like to restrict your search to Artists, Albums, Composers, or Songs, you can do so by clicking on the small magnifying glass in the search box and selecting the appropriate item.

The search function is especially useful when you're looking for a sound effect. For example, if you are looking for the sound of juice pouring into a glass, you can try searching for juice or pour. Figure 5-10 shows a search for the word juice and the result from a library of over 6,500 tracks.

figure Figure 5-10. Finding sound effects using iTunes

Importing tracks.

When you have located a song or effect you would like to use in your project, you have a few options. If your editing system is aware of iTunes, you will be able to import songs directly. If your editing system is not aware of iTunes, the most basic and reliable solution is to locate the original CD or audio file where you obtained the track and then import it into your editing system.

Another option to import the audio track is to find where iTunes maintains its library: choose Preferences → Advanced and look at the entry for the iTunes Music folder location. When importing from the iTunes library, you might need to navigate a series of folders, most likely Artist and Album. For example, if you are attempting to import Jar, Juice Pour Into Glass, Food from your library, you have to navigate through the Sound Ideas folder (the Artist of the CD), then 6021 - Household #2 (the Album of the CD), and then select the appropriate track. When using this method, it is helpful to have both the Artist and Album columns visible in the iTunes window.

Using Playlists

iTunes does a great job in organizing music tracks, and you can possibly get away with just having one big library. However, you might want to create playlists to help keep your library more organized, particularly if you are wrangling a large sound library. Additionally, the iTunes Smart Playlists automatically update themselves when you add tracks that fit within certain criteria. As an additional benefit, when you select a playlist and then search, the search is limited to the tracks contained within the playlist.

Knowing the cost of a track.

When in post-production, questioning the cost of audio is not uncommon. In fact, I'd say it's uncommon that this question doesn't arise. If you enter the licensing cost of a track in the Comments field, you can easily find out how much it costs to license.

You can also create Smart Playlists to contain tracks that cost a certain amount. For example, you could have playlists for royalty-free music or $99 music. For your royalty-free music, just enter royalty-free in the Comments field. Then, create a Smart Playlist (File → New Smart Playlist…) called Royalty Free to contain only tracks in which Comments → contains → royalty-free. Then, do the same process for tracks that cost $99.

Staying on top of your usage.

Another common question about music regards exactly what you have used. In other words, someone might ask what music you used in a particular project—often a year or more after you've completed it. The unfortunate answer is often, "Um, I don't know."

Well, again, iTunes can help you out. By creating a basic playlist and naming it the same as your project, you can add the songs and effects you use in your project to it. To create a Playlist, choose File → New Playlist. Then name your Playlist and simply drag audio tracks from your Library to the Playlist in order to add them.

If at any time, you need to know what music or effects you used, simply click on your project's playlist and find the information you need. A nice side effect of the project playlist is that, if you've also entered the associated costs, you can scan down the column and get a quick approximation of how much you've spent!

Hacking the Hack

Don't be afraid to be creative! If you're willing to step outside the bounds iTunes has set up, you can bend the application to fit your needs.

Hacking costs.

If you want to enter the cost information for your tracks in the Year field, go right ahead. By doing so, you can create smarter playlists, in which the collections are of tracks costing between $5,000 and $9,999, for example. If you take this approach, however, you might discover that the year is limited to four digits, so your licensing fees couldn't exceed $9,999, which is probably fine for everyone except those looking to license a good Rolling Stones song.

Bottlenecking a group.

If you are working with more than one editor, you can create a central library of your approved music and sound effects. The setup requires one system to be the server, which is where the library will be shared. Because iTunes uses Rendezvous to find other iTunes players, all of your systems will be able to find the server and will be able to search, listen, and browse the tracks.

WARNING In order for the editors to be able to import the music into their project, the folder where the music is stored on the server has to be shared across the network. This is different than sharing music using iTunes.

There are a number advantages of using a central system. First, editors are able to use only authorized tracks, because they need to obtain their music from the shared playlist. This should curtail rogue editors from sneaking in unlicensed music and effects. You can ensure that no unlicensed tracks wind up in your final project by relinking all of your audio tracks with only the drive in which the iTunes library resides. So long as no one has been able to write files to the drive, any unlicensed tracks will be offline.

Turn Video into Matrix-Style Symbols


The Matrix Trilogy was a pop-culture phenomenon. The streaming green text symbols that appeared in the movie slowly found their way into screensavers, web sites, and even on T-shirts. Here's a way you can watch almost any digital video in a similar way.

In the movie The Matrix, certain people had the ability to look at green characters streaming down a black computer screen and interpret what they meant. [1] It was as if they could see images in the characters. Well, you don't live in the Matrix (or, maybe you do…who knows?), but you can see images in streaming characters with a little help from your computer. Better yet, you can choose which images you'd like to see.

TIP: The conversion of video to a series of characters is often referred to as an ASCII (pronounced "as-kee") movie.

Downloading ASCIIMoviePlayer

If you are using Mac OS X, the QuickTime engine is buried deep in your operating system. To show this fact, some of Apple's engineers designed ASCIIMoviePlayer (http://developer.apple.com/samplecode/ASCIIMoviePlayerSample/ ASCIIMoviePlayerSample.html) to play a QuickTime movie inside a Terminal window, which displays only text. The ASCIIMoviePlayer application takes the input of a video file and interprets its luminance as text-based symbols. It accomplishes this feat through the use of QuickTime.

After downloading ASCIIMoviePlayer you will have a folder containing four items: ASCIIMoviePlayer, ASCIIMoviePlayer.pbproj, build (a folder), and qtplyr.c. The one you are going to be most interested in is the file named ASCIIMoviePlayer, which is the actual application.

TIP: The other files contain the pieces necessary for you to build the application from scratch. The actual source code for the application is in qtplyr.c, should you wish to see how it works or even enhance it. If you have installed the Developer's Tools, included with Mac OS X, you can double-click ASCIIMoviePlayer.pbproj to work with the source code.

Running ASCIIMoviePlayer

To run ASCIIMoviePlayer, you need to run the Terminal application. If you are not familiar with Terminal, you can find it in the Utilities folder. The default color for Terminal is black text on a white background.

If you would like to change the color of the text and background in Terminal, choose Terminal → Window Settings → Color. There is a set of preselected color schemes, one of which is Green on Black. You can also customize the color combination, if you so desire.

To run a movie through ASCIIMoviePlayer, drag-and-drop the ASCIIMoviePlayer application to the Terminal window. Then, drag-and-drop a movie you would like to play (of course, you can type out the commands if you so desire).

TIP: When you drag-and-drop a file on the Terminal window, you will notice that the path of the file appears automatically. This is the expected behavior.

Before hitting the Return key, you should maximize the Terminal window by clicking on the Zoom button (the small green button in the upper-left corner of the window). Figure 6-20 shows a Terminal window about to run ASCIIMoviePlayer using a movie called mymovie.mov.

figure Figure 6-20. Terminal, ready to show a movie

Once you are prepared, press the Return key and watch the characters stream along your screen. You should be able to see your movie within the streaming characters. Figure 6-21 shows a frame from a movie playing in ASCIIMoviePlayer.

figure Figure 6-21. Did you take the Red Pill?

Alternate Approaches

There are other programs that are capable of converting movies to ASCII.

QuickASCII (http://sourceforge.net/projects/quickascii/; free, open source) is based on ASCIIMoviePlayer, but it has added optional color output and performance enhancements. QuickASCII runs on Linux, Mac OS X, and other Unix-like operating systems.

MPlayer (http://www.mplayerhq.hu/homepage/; free, open source) is a video player that is available for Windows, Mac OS X, Linux, and just about every other operating system on the planet. It is a capable media player in its own right, but if you add AA-lib (http://aa-project.sourceforge.net/aalib/; free, open source), you can get MPlayer to output ASCII movies by using the -vo aa argument. If you have trouble building AA-lib, there is an installer package at http://sveinbjorn.vefsyn.is/aalib. If you want to add color ASCII output, you can add the libcaca library (http://sam.zoy.org/projects/libcaca/).

Hacking the Hack

Sure, watching the video is fun for a while, but if you want to, you can integrate its output into your movie. For example, you can take an edited scene from your movie and dissolve to the continuation of the scene, only ASCIIfied. There are a couple ways to accomplish this effect:

  • You can use a screen-recording program and capture the ASCII movie as a digital movie. I do not recommend this method unless you have very fast hardware and an abundance of hard drive space.

There is also a virtual community of people creating and working with ASCII art. There are ASCII webcams, ASCII pictures, and even ASCII cartoons. ASCII…who woulda thought?


[1] For film geeks: the Wachowski Brothers did pay some homage to Ghost in the Shell.

Create a Credit Flag


Most digital video software enables you to easily create text on screen. Some are even quite advanced and can create really cool titles. But sometimes, a more rudimentary approach can yield equally impressive results.

Most movies begin with an opening scene and a list of people's names and titles superimposed over it. This is known as the Title Sequence. Taking a simplistic method to creating credits (I call the method credit flags) will cause people to wonder, "How'd they do that?"

Preparing Your Flags

First, you will need to gather a few supplies: a large swatch of lightweight white fabric, a black marker, a wooden or metal pole, and a fan. You will also want a pair of scissors and way to attach the fabric to the pole, such as a stapler, push pins, or even tape. Figure 6-31 shows a sample set of the required materials.

figure Figure 6-31. Tools to create your credits

After you obtain the necessary materials, cut the cloth into squares large enough to write on using the marker. For example, when creating your personal credit flag, you will need a square of cloth large enough to write "Written and Directed by: Me!" in big, black letters. How you write and layout the letters is a matter of personal taste. You should create a flag for each person, or group of people, you would like to provide an on-screen credit.

Recording Your Flags

After you have created your flags, you are ready to assemble a credit flag and record your video. To create the flag, attach the square of cloth to your pole. Then stand the pole upright, with the fan aimed at the side of the flag.

You will need to set and focus your camera on the flag. Make sure that the flag fills the screen, even when being blown about by the fan. If you notice there are dark shadows on the flag while it is blowing around, you should provide additional light on it in order to reduce their appearance.

TIP: To provide a little more room for error, you might want to record your footage against a white background. If you don't have a fan, you can manually wave the flag, by holding the pole horizontally and rolling it back and forth.

After you have set your camera, begin recording. Capturing around 30 seconds per flag should provide more than enough footage. Repeat the process until all of the people important to your movie have had their flags recorded. Your final video will then need to be imported into your editing system. Figure 6-32 shows a credit flag, as imported into Adobe Premiere Pro.

figure Figure 6-32. A flag, soon to become a credit

Matting Your Flags

After you have digitized all of your footage, open the footage in your Editor and apply an Inverse effect, making the letters white and the cloth black, as shown in Figure 6-33.

figure Figure 6-33. Not a chalkboard, just an inverted flag

Here's how to digititize the footage in various editing systems:


Tools → Effects Palette → Image → Color Effect (Chroma Adjust → Invert)

Final Cut

Effects → Video Filters → Channel → Invert

Movie Maker

Window → Effects → Video Effects → Channel → Invert


Use the Negate B/W plug-in from cf/x (http://www.imovieplugins.com/; free)

TIP: If you find that your credit flag doesn't look "right," check your lighting set-up.

After applying the inverse effect to your footage, place the footage over your opening scene and apply a Matte or Key effect to it:


Tools → Effects Palette → Key → Luma Key

Final Cut

Effects → Video Filters → Matte → Image Mask


Effects → Keying → Luma Key (adjust Threshold and Cutoff settings accordingly)

figure Figure 6-34. The Directed By opening credit, as created

Once you have placed your credits in your timeline, render it and play. Your credits should now have an airy "feel" to them.

Hacking the Hack

For an additional "wow," apply some movement to the credits by making them move around the screen. Apply movement to have them bounce, fly on and off screen, and so forth. By matching the movement of your credits to the beat of some music, you will create a very organic feeling title sequence.

A variety of options can be applied to this method. Experiment, discover and, most of all, have fun.

Take Donations via PayPal


Make your video open a web page that accepts donations.

QuickTime, Real, and Windows Media can all forward viewers to a URL. By using Discreet's cleaner (http://www.discreet.com/products/cleaner) application, you can easily open a web browser from any of these players and send the viewer to a PayPal donation page. Whether people actually donate or not is a whole 'nother story.

WARNING The latest version of cleaner for Windows has dropped the EventStream feature. If you are using Windows, and would like access to EventStream, you should try to locate an older version of cleaner. You might also want to pressure Discreet to bring the feature back.

Importing Your Video

Once you've installed cleaner and launched it, you need to import your movie to the batch process. To accomplish this, you can either drag and drop your movie file to the Batch window, or select the menu item by choosing Batch → Add Files…. After you have added your movie, double-click on the icon that represents your movie or select the movie and then the menu item (Windows → Project).

In your Project window, jump to the end of your movie (or the point in your movie where you would like to seek a donation), as shown in Figure 7-31.

figure Figure 7-31. Jumping to the end of your movie

TIP: I usually back off the exact end of the movie by about one second, simply because I do not trust the video file to always act appropriately.

Once you have found the point where you would like to ask for the donation, select the Event Stream tab or select the menu item (Windows → Event Stream).

Creating the Event Stream

Once the Event Stream window is open, you need to create an Event by clicking the Add button. Then, select the Open URL item from the pop-up menu. You will then be able to fill in the URL for where you would like to send your viewers, as shown in Figure 7-32.

figure Figure 7-32. The Open URL event

Creating the URL

PayPal has a simple URL for donations:

https://www.paypal.com/xclick/business=<username>%40<domain>.<tld>&item_ name=<your_item>

The %40 is the equivalent to an @ symbol, so replace the <username> with the part of your email address that comes before the @ symbol, the <domain> with the part of your email address that comes between the @ symbol and the last dot (.), and the <tld> with the last section of your email address following the last dot. Lastly, change <your_item> to your description of the donation; something like Donation should be sufficient.

Wow! That is a little confusing, so here is an example using the email address of video@domain.com:


After entering the URL, check to make sure it works as you expect by clicking the Preview button. If you have typed the URL correctly, your web browser should open and take you to a PayPal page, allowing a viewer to fill in an amount she would like to donate. If you receive an error page, or if the page does not show the correct information (e.g., your email address is wrong), go back and make sure the URL you have entered is correct.

TIP: The interface cleaner offers to enter URLs can be frustrating to use, because the text field you type the URL into is too short. Basically, there is nowhere on screen you can see the entire URL you have entered. To overcome this limitation, I recommend typing the URL in a simple text editor, such as WordPad or TextEdit, and then copying and pasting it into the Event Stream window.

When you have the Open URL event working as you like it, click the Save button.

Compressing and Distributing

Now that your Event Stream is in place, you need to select the settings for how you would like to compress your movie. There are almost infinite compression settings available, so for brevity, I will jump ahead, knowing you will select a setting appropriate to your distribution requirements [Hack #77]. However, make sure to use either the QuickTime, Windows Media, or Real file format. Once you've configured your settings, start the Encoding process and wait for it to finish.

Once the encoding process has completed, locate your movie file and double-click it. Your movie should automatically open in the associated movie player. After your movie opens, you should make sure the URL is opened at the correct time.

TIP: If you have a long movie, don't be shy about jumping ahead to test the outcome. Your viewers might just do the same at some point.

Happy! Happy! Joy! Joy! Get your movie out there [Hack #86] and hope people help support your digital video habit (and bandwidth costs).

Hacking the Hack

PayPal offers a wide variety of parameters for you to configure via a URL. One parameter allows you to specify how much money you are requesting. To specify this parameter, alter the URL with the <amount> variable:


In addition to specifying the amount of the donation, you can forward people who make a donation to your own "Thank You" web page, allow people to send you a personal note, and/or even request their address (maybe to send them a full-quality DVD?!).

If you plan on distributing Windows Media or QuickTime files only, you can seek donations using either Windows Media File Editor or QuickTime Pro, respectively.

Using Windows Media File Editor.

Using Windows Media File Editor, which is a part of the Windows Media Encoder 9 Series (http://www.microsoft.com/ windows/windowsmedia/9series/encoder/default.aspxi), you can add script commands to a video. One such command will open a URL in the viewer's web browser.

After launching Windows Media File Editor, choose File → Open, and select the video that you would like to embed with your PayPal URL. After the video is open, move the time indicator to end of video and click the Script Commands… button. This will open the Script Commands window, where you should click the Add… button.

From the Type pop up, in the Script Command Properties window, choose the URL type. Then enter the PayPal URL in the Parameter text box. When you are finished, click the OK button. Then choose Save and Index… from the File menu.

Using QuickTime Pro.

You can easily add your PayPal URL to the end of your QuickTime video by following the steps outlined in Apple's "HREF tracks" tutorial at http://www.apple.com/quicktime/tools_tips/tutorials/hreftracks.html.

View catalog information for Digital Video Hacks

Return to digitalmedia.oreilly.com