Digital Video Hacks: Tips & Tools for Shooting, Editing, and Sharing (OReillys Hacks Series)

 < Day Day Up > 

An alternate ending is merely a different ending to a movie, as opposed to the one shown in the official release. Using some of the hidden features in QuickTime, available through Totally Hip's LiveStage Pro, you can provide an alternate ending to your movie based on the time the viewer is watching it.

You might remember the Choose Your Own Adventure books where, at the end of a chapter, you were able to choose one of a handful of options. Based on your choice, you would then jump to a specific page in the book, where the story would resume. The story would unfold based on the choices you made and you could read the book many times over, each time with a different out-come.

Reading is an easily adaptable medium for interaction, but video is not. People watch video passively; otherwise, they play video games, which are interactive. So, how can we adapt the passive medium of video to something that is interactive? One way is through time; depending on the time the video is watched, certain scenes will present themselves.

Using Totally Hip's LiveStage Pro (http://www.totallyhip.com; $449.95) you'll be able to create movies that can alternate scenes based on the time of day.

6.13.1. Planning for Passive Interaction

The first step in creating a passive-interactive video is to plan ahead. Just like the Choose Your Own Adventure books, you will need to plan for the occurrences you want to present and shoot the appropriate scenes. For simplicity, you should start with only one alternate ending, which means you need to shoot a total of two endings. As you get used to this type of video, you can create as complex a movie as you like.

You will not want to add the interactivity until after you have completed editing your movie. Upon completion, you should output three digital movies:

  • The entire movie, minus the ending

  • The original ending

  • The alternate ending

You will compile these movies into one, final movie for distribution.

6.13.2. Creating Your Project

Start a new project in LiveStage Pro and choose Edit Document Settings…to change some of the properties of the movie. Under the Playback tab, change the Transport Controller: pop-up to Standard Movie. This will place the familiar time indicator at the bottom of the movie, along with a Play/Pause button and volume controls.

Under the Settings tab, change the width and height of the movie to 720 and to 480, respectively (720 x 576 for PAL).

If you would like to annotate your movie with your name, some comments, or and disclaimers, for example you can do so under the Annotations tab.

6.13.3. Importing Your Movies

Locate your complete movie on your hard drive and drag it onto your Live-Stage Pro timeline. The video and audio tracks will be separated out and labeled Video 1 and Sound 1, respectively. You can change their labels by double-clicking on the label on the left side of the window. This will open a window, allowing you to change the name of the track, the height and width, and a whole bunch of other details (which do not pertain to this hack).

6.13.3.1. Adding the endings.

In order to make the alternate ending work, you obviously need the two endings to become a part of final movie. Locate the original ending and drag it to the timeline. Then, change the name of the video track to OriginalV and the audio track to OriginalA. Repeat the process with the second alternate ending, but change the tracks to AlternateV and AlternateA.

The naming of the tracks is important, because that is how your movie is going to identify which tracks to play.

You will most likely notice that your movies are all stacked on top of each other. If you were to play your movie right now, all of the audio tracks would mix together and only the top-layer video track would be visible. That's not what you want, so you need to move the two endings to the end of your movie.

6.13.3.2. Moving the endings.

To move the endings to the end of the movie, you need to enable the Track Manipulation Tool by clicking on the bottom icon on the left side of the timeline. Once you've enabled the tool, your tracks will turn grey-silver in color. You can then click on the video and audio tracks and drag them individually to the end of the movie. If you move slowly near the end of the movie, the tracks should snap into place. Figure 6-42 shows the Track Manipulation Tool as enabled and the alternate endings lined up.

Figure 6-42. Moving the tracks with the Track Manipulation Tool

If you want to make sure your movies have lined up correctly, you can zoom into the timeline (just like most video editing programs) using the Zoom Slider at the bottom left of the window or by using the keyboard shortcuts to zoom in ([) or zoom out (]). After placing your endings, click on the Selection Tool, which is the arrow button at the top left of the timeline.

6.13.3.3. Enabling passive interaction.

Okay, you've got everything lined up. So, how do you make the movie "know" what time it is and which track to play? You can either use a Sprite Track or a Text Track. Both track types will accomplish the same goal, but I like the Text Track for this task.

To add a Text Track, select Movie Create Track Text. You will then have a new track at the top of your timeline. If you cannot see the green-colored track, you need to move to the start of your timeline. You should double-click the green track, which will open the track editor.

Under the Track Events, on the bottom left of the window, you will see a list of events what can occur. Click on the Frame Loaded event and type the following script:

if (LocalHours < 17) TrackNamed("OriginalA").SetEnabled(True) TrackNamed("OriginalV").SetEnabled(True) TrackNamed("AlternateA").SetEnabled(False) TrackNamed("AlternateV").SetEnabled(False) else TrackNamed("OriginalA").SetEnabled(False) TrackNamed("OriginalV").SetEnabled(False) TrackNamed("AlternateA").SetEnabled(True) TrackNamed("AlternateV").SetEnabled(True) Endif

The first line checks to see if the local time of the computer is earlier than 5: 00 p.m., or 17 military time (I know, I know, 1700 go with the flow). If the time is earlier than 5:00 p.m., then the original ending is shown. Otherwise, the second alternate ending is shown.

If you don't want the big, white box placed by the text track to show, simply click on the track name (most likely "Text1") and drag it down, below your video tracks. You can also select the Properties tab and enable Keyed Text. If, on the other hand, you want to get creative and add some text, go right ahead. Just make sure you change the Duration of the text if you do add some.

6.13.4. Compiling Your Movie

Now that you've assembled all of the pieces together, you can compile everything together and have your complete movie. To export your movie, choose File Export QuickTime Movie… and type the name of your movie. The process might take a while, depending on the length of your movie. Thats it. You're done.

6.13.5. Hacking the Hack

LiveStage Pro is a powerful program and there is a lot you can do with it. Even within the limitations of enabling alternate endings, you can change the way your movie chooses the ending. For example, instead of using the hour, you can use the minute with the LocalMinutes (or the second using LocalSeconds) instruction instead of the LocalHours. You can also determine whether the viewer is on a Macintosh or Windows machine and even whether they are connected to the Internet.

If you want to really dive in, you can determine the viewer's IP address and, from that information determine their global location using something like GeoIP (http://sourceforge.net/projects/geoip/; free, open source). From there, you could figure out the current weather in their area using the Weather Underground (http://wunderground.com; $5 per year) and then choose an ending based on that information. If you want to go down that path, look at "What's Your Visitor's Weather Like?" (http://hacks.oreilly.com/pub/h/999) from Spidering Hacks by Kevin Hemenway and Tara Calishain (O'Reilly). The possibilities are nearly endless.

The really cool part is that this whole approach to alternate endings is merely scratching the surface of what you can accomplish using QuickTime and Live-Stage Pro.

     < Day Day Up > 

    Категории