Requirements

Prerequisite knowledge

As you work through the tutorial, you should try to avoid clicking things that are not specifically mentioned in the step-by-step instructions. Many clicks can change an application's context, possibly causing the next step in the tutorial not to work as expected. The tutorial is designed to minimize such opportunities for unexpected results, but it's a good idea to stay on the path.

User level

Beginning

In this tutorial, you'll learn how XMP metadata is created, how it flows through Adobe Creative Suite 4 Production Premium, and how it can enhance your workflow. To show how you can use XMP metadata in general, this tutorial focuses on one specific method for using Speech Search metadata to create a user experience in which a viewer can search for, and navigate to, specific spoken words in a video.

Beyond the simple workflow described in this tutorial, XMP metadata features in Creative Suite 4 Production Premium applications make many common editing, asset tracking, animating, and compositing tasks easier. After you've completed the simple steps in this tutorial and seen how much information is readily available to you at each stage of your work, you should realize how easy it is to use these features in each application to streamline your workflow and expand the possibilities of your creative work.

In this tutorial, you'll complete the following tasks:

  • (Optional) Create and view metadata with Adobe OnLocation CS4.
  • Transcribe and edit speech with Adobe Premiere Pro CS4.
  • View metadata with Adobe Bridge CS4.
  • Use expressions in Adobe After Effects CS4 to display speech metadata.
  • Use scripting in After Effects to convert speech metadata to cue points.
  • Use ActionScript in Adobe Flash CS4 Professional to create a movie with speech navigation controls in Adobe Flash Player.

Throughout this tutorial, you'll see references to documentation on the Adobe website. These documents provide additional information about each feature used in this tutorial.

Note: The term context-click means right-click (Windows) or Control-click (Mac OS).

What is XMP metadata?

Metadata, by definition, is simply data about data. An example from the physical world is a library's card catalog entry for a book. Such an entry contains data about the book, including the title, author, and publisher. In the electronic world, digital cameras add metadata to image files. This metadata can include the camera model, film speed, exposure settings, date and time the image was taken, and so forth.

The Extensible Metadata Platform (XMP) is the metadata standard used by Adobe applications. Metadata that is stored in other formats—such as the Exif standard used for digital photographs—is synchronized and described with XMP so that it can be more easily viewed and managed together with other metadata.

In the context of Creative Suite Production Premium, metadata is descriptive information about a file. The files in this case are the assets used in your projects and even the project files themselves. In most cases, XMP metadata is embedded as text within the file and remains with the file, even if it's converted to another format. In some cases in which the file format does not support the embedding of XMP metadata, it can be stored in a sidecar file with the same name but with the filename extension .xmp. In either case, Creative Suite Production Premium applications can read the data and present it for viewing or editing.

For additional information about XMP metadata, see About XMP metadata and Project Intelligence and the XMP metadata website.

Some basic metadata is generated automatically when you create or capture a file, including information about the camera and its settings. You can add other metadata such as your name, copyright information, and much more. Creative Suite Production Premium provides an integrated set of tools for the creation, viewing, and editing of metadata. Metadata is broken into categories in systems known as schemas. You can add new data fields to a schema, or even create your own schema (see Create schemas and properties).

Metadata is also divided into project, file, and clip metadata. Project metadata in After Effects is associated with an entire project; file metadata is associated with an individual asset, such as a video or audio source file. Both project and file metadata are embedded in the asset files, so this metadata is available to other applications, either directly through the graphical user interface or through scripting. Clip metadata in Adobe Premiere Pro and Adobe Soundbooth is stored in the project file, not in the asset file (see About file, clip, and project metadata).

Metadata can be static or temporal. Static metadata applies to the entire asset. This includes data like author, copyright, and creation date. Temporal metadata is metadata that is associated with a particular time within an audio or video file. The metadata generated from Speech Search is an example of temporal metadata.

The Speech Search feature in Adobe Premiere Pro and Adobe Soundbooth CS4 provides the ability to convert speech in a video or audio file to text metadata. Each word is stored as a temporal metadata element at the corresponding time in the timeline. When a file with Speech Search metadata is imported into After Effects and used as the source for a layer, each word appears in a layer marker at the corresponding time. The duration of the layer marker represents the duration of the spoken word (see Convert speech to text metadata).

After Effects scripts and expressions can read and use the metadata stored in markers. You can use an expression in After Effects to display the transcript stored in layer markers. You can use a script to convert the layer markers to Flash cue points and render the file to F4V or FLV format with the temporal metadata embedded in the file. Then, in Flash, you can use ActionScript to search for specific words of dialog, allowing the user to begin playback at a specific word (see XMP metadata in After Effects).

(Optional) Create and view metadata with Adobe OnLocation

In this section, you'll learn how to use Adobe OnLocation to generate and edit metadata. You'll create an Adobe OnLocation project, organize your shot list with placeholders, populate the entries with metadata, and capture the video.

Note: You may find it beneficial to just read through this section; you don't need to follow along by performing the steps. Typically, you use Adobe OnLocation to capture the video assets for your project. However, to maximize the usefulness of this tutorial, it's important that your results with Speech Search match those described in the tutorial. Therefore, after this section, you won't actually be using any video you capture in Adobe OnLocation; instead, you'll switch to the video file supplied for the tutorial.

For video assets, much of the static metadata that flows through a project will originate with Adobe OnLocation. Some is captured automatically when you record a shot, and you can even add some before you begin shooting.

For more information about using shot lists in Adobe OnLocation, see Organizing and logging shots.

Create a project

Begin by creating an Adobe OnLocation project, in which you'll set up your shot list:

  1. Start Adobe OnLocation.
  2. From the Welcome screen, select New Project.
  3. Specify a name and location for the project.
  4. Click Save.

Select the recording mode and set up your shot list

In the Shot List panel, click the menu icon in the upper-right corner and select Shot-Recording Mode.

Note: OnLocation provides two recording modes. Shot-Recording mode is for more spontaneous shooting. Take-Recording mode is more useful for a pre-planned shoot. Since you'll only be recording one segment of video in this tutorial, Shot-Recording mode will be sufficient to demonstrate the use of metadata.

  1. In the lower-left corner of the Shot List panel, click the Add Shot Placeholder icon to create a shot placeholder (see Figure 1). Notice that a default clip name is created based on the project name, but most of the other properties are still blank.
  1. If the placeholder is not still selected in the Shot List panel, click the icon to the left of its name to select it.
  2. Click the icon of the placeholder to open its user-enterable properties for data entry. At this point, you can change or enter the clip name, comment, description, or any of the other properties that are enabled for editing (see Figure 2). When you are finished editing the data, press Enter (Windows) or Return (Mac OS) to finalize your entry.

    Note: Most of this user-enterable data will end up as static metadata. One notable exception is the Sequence property, which is used within OnLocation to order the shots in the Shot List. Notice also that many properties are not enabled for editing. These will be populated automatically when you actually record the shot.

  1. To create additional placeholders with the same metadata, context-click the first placeholder and select Make Duplicate Placeholder (see Figure 3).

Notice that the duplicate placeholder has the metadata you entered, except that the clip name has been incremented and the Comments property has been left blank. This allows you to quickly create placeholders for related shots.

  1. If you'd like to enter a comment for the duplicate placeholder, click the duplicate entry once to select it, and then click it again to open the user-enterable properties for data entry (see Figure 4). Enter your comment and click outside the data entry area to finalize your entry.

Connect your camera

Adobe OnLocation communicates with your camera using the IEEE 1394 standard (of which FireWire is a common implementation) and will automatically detect your camera's video standard and format:

  1. Plug one end of an IEEE 1394 cable into a FireWire port on the computer.
  2. Plug the other end of the cable into the camera's FireWire port.
  3. Turn on the camera. Video from the camera should automatically appear in the Field Monitor panel. If it doesn't, it may mean that you have more than one camera available, and you may need to select the camera from the drop-down menu in the upper-left corner of the Field Monitor panel.

Set the recording format

In the upper-right corner of the Field Monitor panel, click the panel menu icon, choose Recording File Format, and select QuickTime (All Frames).

Record your video

Adobe OnLocation provides a number of excellent tools for analyzing lighting, exposure, and color, which you can explore at your leisure. For this tutorial, you'll jump right to recording some video.

Note: The Speech Search portion of this tutorial calls for the use of the video clip provided. However, you may also want to practice the same techniques with your own video. With that in mind, as you record, speak as clearly as possible to optimize the quality of the transcription.

  1. In the Shot List panel, select the shot placeholder for the shot that you want to record.
  2. Start recording by either clicking the Record button in the Field Monitor panel or pressing F2 on the keyboard.
  3. When you've finished recording, stop recording by either clicking the Stop button in the Field Monitor panel, or pressing Esc on the keyboard.
  4. If you want to review the shot, double-click its icon in the Shot List panel.

Examine new metadata

In the Shot List panel, notice that much more metadata has been filled in for the shot (see Figure 5).

View metadata with the Metadata panel

Another way to view a file's metadata is with the Metadata panel. The Shot List panel shows a subset of the metadata that you can also view in the Metadata panel (see Edit, copy, or search shot properties):

  1. If the Metadata panel is not visible, choose Window > Metadata.
  2. Expand the Dynamic Media section by clicking its triangle.
  3. Select a shot in the Shot List panel. Notice that both the metadata you entered and that which was generated automatically show up in the Metadata panel (see Figure 6). Also note that user-entered metadata can be edited in the Metadata panel.
  1. Expand the Dublin Core section of the Metadata panel and notice that the clip name and description appear in this section.
  2. Expand the other sections of the Metadata panel to familiarize yourself with the type of data contained within each section.
  3. Exit OnLocation.

Transcribe and edit speech metadata with Adobe Premiere Pro

Note: For this and subsequent sections of this tutorial, you'll be using Legato_Ames_BTS_02.mov as the video source file. Download and unzip the package containing the tutorial files, if you haven't already done so:

Now that you've learned how static metadata is generated and embedded in a file, you'll learn how to create temporal metadata in the form of transcribed speech using Adobe Premiere Pro. You'll then edit the transcript, use it to navigate to specific words in the clip, and edit the clip itself based on words spoken in the clip.

For additional information about XMP metadata in Adobe Premiere Pro, see the following references in the documentation:

Create a project

Your first task in Adobe Premiere Pro is to create a new project and save it:

  1. Start Adobe Premiere Pro.
  2. From the Welcome screen, select New Project.
  3. Specify a name and location for the project.
  4. Click OK.
  5. In the New Sequence dialog box, expand the DV – NTSC sequence preset group (if it's not already expanded) by clicking the triangle to the left of the folder icon.
  6. Select Standard 48 kHz.
  7. Click OK.

Import and preview the clip

Now you need to import the file that you'll be transcribing. Remember that if you want your results to match this tutorial, you'll need to use the file provided:

  1. Choose File > Import, then navigate to the Legato_Ames_BTS_02.mov clip.
  2. Select the clip and click Open.
  3. In the Project panel, double-click the clip's icon (to the left of the clip name) to open the clip in the Source Monitor panel.
  4. In the Source Monitor panel, click the Play button to preview the clip and familiarize yourself with the speech that you'll be transcribing.

Observe the file's metadata

The Metadata panel allows you examine a file's metadata and also contains the controls that you'll use to transcribe the speech:

  1. If the Metadata panel is not already open, choose Window > Metadata to open it.
  2. In the Project panel, click the icon for the Legato_Ames_BTS_02.mov clip to make sure that it's selected.
  3. In the search field at the top of the Metadata panel, type the word Legato. As you type, notice how sections open and only those entries containing what you've typed so far are visible (see Figure 7). When you've finished typing, only metadata entries containing the word Legato will be visible (see Search metadata).
  1. Clear your entry in the search field by clicking the × icon at the right of the search field.
  2. In the File portion of the Metadata panel, reveal more of the static metadata by clicking the triangle to the left of the Dynamic Media heading.
  3. Use the scrollbar on the right side of the Metadata panel to view the Dynamic Media entries. For example, notice that the camera used was a Sony HXV-200.
  4. Collapse the Dynamic Media section by clicking its triangle.
  5. In the File portion of the Metadata panel, expand the Basic section to reveal other metadata entered automatically by Adobe OnLocation.

Transcribe the speech

Now you'll use the Speech Transcript section of the Metadata panel to convert the file's spoken words to text:

  1. Make sure that the Legato_Ames_BTS_02.mov clip is still selected in the Project panel.
  2. At the bottom of the Metadata panel, click the Transcribe button. (You may need to expand the Speech Transcript section by clicking its triangle.)
  3. In the Speech Transcription Options dialog box, make sure that Quality is set to High (slower) and Language is set to English – U.S.
  4. Since there is only one speaker in this clip, make sure that Identify Speakers is not selected.
  5. Click OK. Adobe Media Encoder CS4 will start and the source file for the clip will be placed in the queue.

    Important: The next step will cause temporal metadata to be embedded into your source video clip.

  6. In Adobe Media Encoder, click Start Queue. Transcription may take a couple of minutes.
  7. When a green check mark appears in the Status column in Adobe Media Encoder, signaling that the transcription is complete, close Adobe Media Encoder.

Compare audio to transcribed speech

Make sure that the Legato_Ames_BTS_02.mov clip is still selected in the Project panel:

  1. Observe that the transcribed speech is now visible in the Speech Transcript section of the Metadata panel (see Figure 8).
  1. Click the Play button in the Source Monitor panel and observe that the words in the Speech Transcript area are highlighted as they are spoken.

Notice that not all the transcribed words are accurate, but that the transcription actually does a pretty good job. The accuracy, of course, depends on the quality of the audio and clearness of the spoken words, but enough keywords are generated to make the transcription useful for keyword search. Also, as you'll see, you can easily correct and edit the transcript to make it more accurate if desired.

From this point forward, you'll focus on the specific spoken phrase, "You can actually produce a film noir movie and then use After Effects and all the rest of the tools in the package to actually assemble a real professional looking movie."

Navigate to a specific word

Now you'll use the Speech Transcript section of the Metadata window to navigate to specific words in the clip:

  1. In the Speech Transcript section, select the word you. Note that Timecode In and Duration indicate the precise location and length of the selected word (see Figure 9). Also note that the current-time indicator in the Source Monitor panel moves to the corresponding frame.
  1. Click the Play button in the Source Monitor panel and note that the playback starts with the selected word.
  2. Select the same word again in the Speech Transcript section of the Metadata panel.
  3. This time, click Play in the Speech Transcript section of the Metadata panel and note that playback begins a little before the spoken word. (You can adjust this preroll time in the General preferences category.)

Set new In and Out Points for the clip

Now you'll use the transcript to set the In and Out Points of the clip to contain just the phrase of interest:

  1. Select the word you again in the transcript.
  2. In the Source Monitor panel, click the Set In Point button (see Figure 10).

Since you want the trimmed clip to end with the word movie, you now need to select the word after movie and then back up a few frames to ensure that only movie is included.

  1. Click the word after movie to select it.
  2. In the Source Monitor panel, click the Step Back button to ensure that the trimmed clip ends with the word movie and doesn't contain any part of the following word (see Figure 11).
  1. In the Source Monitor panel, click the Set Out Point button (see Figure 12).
  1. Preview the desired phrase by clicking the Play In To Out button in the Source Monitor panel (see Figure 13).

Edit the transcript

Next, you'll edit the words in the transcript to more accurately match the actual spoken phrase. There are several problem areas which you'll need to correct. Instead of the word noir, the transcription has in a war. They actually sound very similar, but you'll need to correct it because noir is one of the key words of the phrase (see Edit metadata):

  1. Find the phrase in a war in the transcript and context-click the word a.
  2. Select Merge With Previous Word from the context menu (see Figure 14).
  1. Context-click the word war and select Merge With Previous Word. Notice that you now have now combined the incorrect phrase into a single word, inawar, and it's selected (see Figure 15).
  1. Click the word inawar to enable it for editing. Select the existing text, type the word noir, and press Enter or Return on the main keyboard. Note that by doing it this way (combining the three words rather than editing the first one and deleting the others), the correct duration of the phrase is preserved.
  2. Change the transcribed phrase the news after facts in to then use after effects and by clicking each word twice and editing its text. (Make sure to use all lowercase for after effects. This will make things easier later.)
  3. Context-click the word tolls and select Insert Word Before from the context menu.
  4. Enter the word the as the text for the inserted word and press Enter.
  5. Click the word tolls twice and change it to tools.
  6. Context-click the word package and select Insert Word After from the context menu.
  7. Enter to as the inserted word.
  8. Context-click the word real and select Insert Word Before from the context menu.
  9. Enter a as the inserted word (see Figure 16).

Notice that even though you've inserted a new word here, it has a duration of 00:00:00:00000, which means there wasn't really room to fit in a new word between the adjacent words. When you play the clip in Adobe Premiere Pro, the word won't be highlighted. Also, when you import the clip into After Effects later, you'll notice that there is no layer marker generated for this word. This is not a serious problem, because it's unlikely that anyone would search for the word a.

  1. Check the accuracy of your edits by clicking the Play In To Out button in the Source Monitor panel and watching the words as they are highlighted in the Speech Transcript area of the Metadata panel.

Create a trimmed version of the clip

Next, you'll render and export a new version of the clip that contains only the phrase of interest:

  1. Make sure that the Legato_Ames_BTS_02.mov clip is still selected in the Project panel.
  2. Choose File > Export > Media.
  3. In the Export Settings dialog box, select QuickTime as the Format and NTSC DV as the Preset.
  4. Click the Output Name entry.
  5. In the Save As dialog, navigate to the folder where you want to save the trimmed clip, edit the file name portion of the Output Name path to be Legato_Ames_BTS_02_trans.mov, and click Save.
  6. Click OK to close the Export Settings dialog box. Adobe Media Encoder CS4 will start, with the clip in the queue.
  7. Click Start Queue.
  8. After the clip is rendered and exported, close Adobe Media Encoder.
  9. In Adobe Premiere Pro, choose File > Save to save your project.
  10. Exit Adobe Premiere Pro.

Use Adobe Bridge to examine usage rights

Like other Creative Suite Production Premium applications, Adobe Bridge provides a Metadata panel that you can use to view and edit a file's metadata. In this section of the tutorial, you'll learn how to use Adobe Bridge to verify that you have appropriate usage rights for a file (see View and edit metadata in Adobe Bridge).

Follow these steps to view the metadata of the tutorial assets:

  1. Start Adobe Bridge.
  2. Navigate to the folder where you unzipped the tutorial files.
  3. If the Metadata panel is not already open, choose Window > Metadata Panel.
  4. In the Content panel, select the file Legato_Ames_BTS_02.mov. The metadata displayed should look very similar to the metadata you saw for this file in Adobe Premiere Pro. Note however, that temporal metadata (specifically, Speech Transcript in this case) does not appear in Adobe Bridge. Also note that the metadata categories are named a little differently in Adobe Bridge. For example, instead of Dublin Core you have IPTC Core, and instead of Dynamic Media you have the Audio and Video categories.
  5. Near the bottom of the IPTC Core section of the Metadata panel, observe the Copyright Notice and Rights Usage Terms fields (see Figure 17). This is where you might find (or add, in the case of your own files) usage restrictions. Note that the fields with the pencil icons along the right edge are editable within Adobe Bridge. To edit one of these fields you would simply click in the field and begin typing.
  1. In the Content panel, select the file title_wlayers.psd.
  2. In the File Properties section of the Metadata panel, observe the descriptive metadata in the File Properties section (see Figure 18). You can see that this document was created in Adobe Photoshop CS3. Also, notice the presence of Resolution, Bit Depth, and Color Mode fields, which were not included in the metadata for the video file. This demonstrates that as you might expect, that the metadata included with a particular file depends on the file type.
  1. Examine the IPTC Core section and note the absence of any copyright or usage restrictions.
  2. Exit Adobe Bridge.

Use After Effects to examine speech metadata

In this section, you'll import the video file you created in Adobe Premiere Pro and a PSD logo file. You'll use the video file to create a composition, and you'll add the logo to it. You'll examine the temporal speech metadata contained in the video layer's marker comments. You'll also examine the static metadata of both files and the project itself. Then you'll use an expression to display the transcript in a text layer. Later, you'll use an After Effects script to convert the layer markers to navigation cue points and export the composition as an FLV movie.

Import assets into After Effects

Start by importing the video file you created in Adobe Premiere Pro and a PSD logo file:

  1. Launch After Effects.
  2. Choose Edit > Preferences > Media & Disk Cache (Windows) or After Effects > Preferences > Media & Disk Cache (Mac OS).
  3. In the XMP Metadata section, verify that Create Layer Markers From Footage XMP Metadata is checked (see Figure 19), and click OK.
  1. Choose File > Import > File, then navigate to and import the Legato_Ames_BTS_02_trans.mov video file you previously exported from Adobe Premiere Pro.
  2. Choose File > Import > File, then navigate to and import the title_wlayers.psd file. When the Import dialog box appears, make sure that Import Kind is set to Footage, and click OK.

Create a new composition

Next, create a composition:

  1. In the Project panel, drag the Legato_Ames_BTS_02_trans.mov footage item to the Create A New Composition button at the bottom of the panel. After Effects creates a new composition with settings (including size and duration) that match those of the source footage item (see Figure 20).

Notice that each word in the transcription appears as a layer marker in the timeline of the new composition. In the Timeline panel, the text appears as the comment, and the duration appears as the small horizontal bar below each word (see Figure 21).

If you examine the markers carefully, you may notice a potential problem that was introduced when you edited the speech text in Adobe Premiere Pro. It turns out that two markers are located at the same time on the timeline. This will create a problem for the simple ActionScript code that you'll use when you get to the Flash section of the tutorial, so you need to correct it here.

  1. Slide the Zoom slider at the bottom left corner of the Time Ruler portion of the Timeline to the right to zoom in as much as possible on the markers. Alternatively, press the semicolon (;) key on the keyboard.
  2. Use the Time Ruler's horizontal scroll bar to find the markers for the phrase of the tools. (Tip: Press the K key to move current-time indicator to the next layer marker.) Notice that the markers for the words the and tools are located at the same frame (see Figure 22).
  1. Double-click the of marker (the marker itself, not the comment) to open the Layer Marker dialog box.
  2. Change the Duration value from 0:00:00:03 to 0:00:00:01, and click OK to close the dialog box.
  3. Of the two markers at the same location, carefully click the marker that is exposed a tiny bit on the left—a hint with the marker's comment (the) will pop up when you have the cursor in the right spot—and drag it to the left (see Figure 23) until it's positioned against the duration bar for the previous marker (of).
  1. Slide the Zoom slider at the bottom-left corner of the Time Ruler portion of the Timeline panel to the left to zoom out as much as possible. Alternatively, press the semicolon (;) key on the keyboard.

Add a logo to the composition

Now add a logo to the composition you just created:

  1. Drag the title_wlayers.psd footage item from the Project panel into the Composition panel.
  2. Make sure the title_wlayers.psd layer is selected in the Timeline panel, and press S on the keyboard to reveal the layer's Scale property.
  3. Click the left-most value of 100.0 and change it to 12 and press Enter. Note that both scale values (x and y) change together.
  1. If the Mode column (shown to the right in Figure 24) is not visible in the Timeline panel, context-click one of the column headings and choose Columns > Modes. Note that the Mode column may appear in a location different than that shown in Figure 24.
  2. In the Mode column, change the blending mode of the title_wlayers.psd layer to Screen. Notice that this causes the layer's dark background to disappear so that only the text and glow are visible on top of the underlying video layer.
  3. In the Composition panel, drag the title_wlayers.psd layer to the lower-right corner of the composition (see Figure 25).

View static metadata

By now you should be familiar with the Metadata panel that is common throughout Creative Suite Production Premium. Here you'll examine a slightly different implementation in After Effects:

  1. If the Metadata panel is not already open, choose Window > Metadata to open it. Notice that the Metadata panel is divided into two panes. The top pane (Project) displays metadata associated with the After Effects project. The lower pane (Files) displays the metadata for the file currently selected in the Project panel.
  2. Select the Legato_Ames_BTS_02_trans.mov video clip in the Project panel and observe its static metadata in the Files pane of the Metadata panel, clicking the triangles to the left of each heading to expand or collapse each section. Note that even though this is the file that you rendered previously from Adobe Premiere Pro, the metadata from the original Legato_Ames_BTS_02.mov file has been retained. However, if you look at the Date Created entry in the Basic section, you'll see the date and time that you rendered and exported the shortened version of the clip.
  3. Select the Photoshop PSD file in the Project panel to observe its static metadata in the Files pane of the Metadata panel.
  4. Feel free to enter your own metadata in the editable fields in Project pane of the Metadata panel. (Creator and Description in the Dublin Core section would be good choices.)
  5. Choose File > Save. In the Save As dialog, name your project file, navigate to the folder where you want to save the project, and click Save.

Use a text layer and an expression to display transcribed speech

In this part of the tutorial, you'll learn how to access speech metadata with After Effects expressions. This doesn't actually get you any closer to the final objective of a word-searchable movie in Flash Player, but as long as you're here (in After Effects), you might as well see how to do it. You'll create a text layer and apply an expression to its Source Text property. The expression will display the speech metadata five words at a time as a simple form of captioning:

  1. In the Tools panel, click the Horizontal Type Tool icon to activate the Horizontal Type tool (see Figure 26).
  1. If the Character panel is not visible, choose Window > Character.
  2. In the Character panel:
    1. Select a sans-serif font (like Arial).
    2. Set the Font Size to 30.
    3. Set the Fill Color to white.
    4. Set the Stroke Color to No Stroke Color.
  3. If the Paragraph panel is not visible, choose Window > Paragraph.
  4. In the Paragraph panel, click the Center Text button.
  5. With the Horizontal Type tool still active, click in the Composition panel, near the bottom center. A new empty text layer is created.
  6. With the new text layer selected in the Timeline panel, choose Layer > Layer Styles > Drop Shadow. This will help make the text visible against any background.
  7. With the new text layer selected in the Timeline panel, click the triangle to the left of the layer's name to reveal the layer's properties.
  8. In the layer's properties, click the triangle to the left of the word Text to expand the Text properties, including the Source Text property.
  9. Copy this expression:
//**************************************************** // This expression creates a text string consisting // of groups of five marker comment fields // (separated by spaces). Each text string is displayed // when the current time has reached the first marker // of that group. L = thisComp.layer("Legato_Ames_BTS_02_trans.mov"); max = 5; // number of words to display n = 0; if (L.marker.numKeys > 0){ n = L.marker.nearestKey(time).index; if (L.marker.key(n).time > time){ n--; } } s = " "; if (n > 0){ base = Math.floor((n-1)/max)*max + 1; for (i = base; i < base + max; i++){ if (i <= L.marker.numKeys){ s += L.marker.key(i).comment + " "; } } } s
  1. Alt-click (Windows) or Option-click (Mac OS) the stopwatch icon to the left of the Source Text property's name.
  2. Observe that the expression text area opens in the Time Ruler section of the Timeline panel (see Figure 27) with this default expression highlighted:
text.sourceText
  1. While the default expression text is still selected, context-click the expression text and select Paste from the popup menu.
  2. Press Enter on the numeric keypad to exit expression-editing mode.
  3. In the Timeline panel, drag the current-time indicator and notice that the transcribed speech is displayed in groups of five words.
  1. Leave the current-time indicator positioned such that the longest group of words (to actually assemble real professional) is visible.
  2. Activate the Selection tool by clicking its icon in the Tools panel.
  3. With the new text layer still selected in the Timeline panel, adjust the font size and/or tracking amount in the Character panel as necessary so that the text easily fits within the width of the composition.
  4. In the Composition panel, make sure that the text layer is centered horizontally by dragging it if necessary.
  5. Create a RAM preview by pressing the 0 key on the numeric keypad.
  6. Observe that each group of five words is displayed when the first word of the group is spoken.

Use After Effects scripting to convert speech metadata to Flash cue points

Now you'll learn how to use scripting in After Effects to convert the video layer's markers to navigation cue points for use in Flash CS4 Professional and Flash Player. Then you'll export an FLV movie which you'll use later in Flash Professional to create a word-searchable movie.

Use script to convert markers to navigation cue points

Here you'll examine the details of one of the video layer's markers. Then you'll run an After Effects script to convert the layer markers to Flash navigation cue points. Finally, you'll examine the marker again to observe the change:

  1. Double-click one of the video layer's markers (the marker itself, not the comment) in the Timeline panel. The Layer Marker dialog box will open (see Figure 29). Observe that the transcribed word appears in the Comment field, and in the Flash Cue Point section Event is selected.
  1. Click OK to close the Layer Marker dialog box. For Flash ActionScript code to be able to navigate to a particular word, you need to convert the Flash Cue Point type from Event to Navigation. You could do this by hand, but this is an easy task for an After Effects script.
  2. Copy this script:
#target aftereffects-9.0 //******************************************** // This script searches the selected layer for // layer markers, and converts each one it finds // to a navigation cue point by setting the // marker's eventCuePoint attribute to false // and copying its Comment value to the cue point // Name field. { var myComp = app.project.activeItem; if (myComp && myComp instanceof CompItem){ var selLayers = myComp.selectedLayers; for (var i = 0; i < selLayers.length; i++){ var myMarker = selLayers[i].property("Marker"); for (var j = 1; j <= myMarker.numKeys; j++){ var curMarker = myMarker.keyValue(j); curMarker.cuePointName = curMarker.comment; curMarker.eventCuePoint = false; myMarker.setValueAtKey(j,curMarker); } } } }
  1. Paste the script into a text editor. Save the file to a convenient location, giving it a name that you'll recognize and a .jsx extension. Make sure you use a simple text editor (like Notepad), because a word-processing program may add formatting to the text that will cause the script to fail.
  2. Make sure the video layer is selected in the Timeline panel.
  3. Choose File > Scripts > Run Script File and navigate to and select the script file you just created.
  4. Click Open.
  5. After the script runs, double-click the marker you examined previously. In the Layer Marker dialog box, observe that in the Flash Cue Point section, Navigation is now selected. The Comment value has also been copied to the Name parameter in the Flash Cue Point information for the marker (see Figure 30). Note that a dot in the middle of a marker icon indicates that the marker contains cue point information.
  1. Click Cancel to close the Layer Marker dialog box.

Render and export as FLV

You're almost done with your work in After Effects. All that's left to do is render an FLV movie with the embedded navigation cue points to allow ActionScript code to find specific words in the video:

  1. (Optional) If you don't want the captions to appear in the rendered movie, then click the Video switch (eyeball) for the text layer in the Timeline panel.
  2. Choose Composition > Add To Render Queue. The Render Queue panel will open with a new entry.
  3. In the Render Queue panel, click the underlined text (Lossless if you haven't changed the defaults) to the right of the Output Module heading. This opens the Output Module Settings dialog box.
  4. Set the Format to FLV.
  5. If the FLV|F4V Export Settings dialog box doesn't open automatically, open it by clicking the Format Options button in the Video Output section of the Output Module Settings dialog box.
  6. When the FLV|F4V Export Settings dialog box opens, select the FLV – NTSC Source, Web Large (Flash 8 and Higher) preset and click OK.
  7. At the bottom of the Output Module Settings dialog, make sure Audio Output is selected.
  8. Click OK.
  9. In the Render Queue panel, click the underlined text to the right of the Output To heading, and navigate to the folder where you want the FLV file to be saved.
  10. Click Save to close the Output Movie To dialog box.
  11. In the upper-right corner of the the Render Queue panel, click the Render button.
  12. After the movie has been rendered, encoded, and exported, choose File > Save to save the project.
  13. Exit After Effects.

Create a movie with speech navigation controls

You've arrived at the final task in your metadata journey. You now have an FLV file with embedded speech navigation metadata that will allow you to create a word-searchable movie. Here you'll create a Flash project and add an FLVPlayback component to the Stage. You'll link the FLVPlayback component to the FLV file that you created in After Effects. Then you'll add navigation controls (a button and a text entry field) that will allow you to search for specific words in the movie. Finally, you'll add the ActionScript code necessary to connect the controls to the movie, and test your movie.

For more information about adding or editing metadata in Flash, see Add XMP metadata to a document.

Create a Flash project

Start by setting up the Flash project:

  1. Launch Flash CS4 Professional.
  2. Choose File > New.
  3. In the New Document dialog, select Flash File (ActionScript 3.0).
  4. Click OK.
  5. If the Properties panel is not visible, choose Window > Properties.
  6. In the Properties section of the Properties panel, click the Edit button.
  7. In the Document Properties dialog box, set the width to 720 px and the height to 520 px. This will allow room for the video clip and controls.
  8. Set the Frame rate to 30 fps.
  9. Click the Background color swatch and set the background color to a light blue (e.g., #CCCCFF).
  10. Click OK to close the Document Properties dialog box.

Add the FLVPlayback component and import the video

Now add the FLVPlayback component to the Stage and link the component to the FLV file you created in After Effects:

  1. If the Components panel is not visible, choose Window > Components to open it.
  2. From the Video section, drag an FLVPlayback instance onto the Stage and position it near the top center.

    Note: The Components panel shows only ActionScript 3.0–compatible components because that's the type of file you chose when you created the project. A different list of components appears when working with ActionScript 2.0 files.

  3. With the FLVPlayback component still selected on the Stage, change <Instance Name> to my_video in the Property inspector.
  4. If the Component inspector is not visible, choose Window > Component Inspector to open it.
  5. In the Parameters tab, find the source parameter in the Name column. Click in the Value field for the source parameter.
  6. Click the magnifying glass that appears.
  7. When the Content Path dialog box appears, click the folder icon and navigate to the FLV file that you created in After Effects.
  8. Click Open.
  9. Click OK.
  10. Drag the FLVPlayback component so that it's positioned at the top of the Stage, leaving a small empty area at the bottom of the Stage.
  11. In the Component inspector, notice in the Parameters tab that the cuePoints parameter contains the text and time data for each of the transcribed words. Click in the Value field and then click the magnifying glass icon to see all the cuePoints data (see Figure 31).
  1. Click OK to close the Cue Points dialog box.
  2. In the Parameters tab of the Component inspector, change the Value field for the autoPlay parameter from true to false. This will keep the video from starting to play after it loads.

For more information about the FLVPlayback component, see Using the FLVPlayback component. For information about Flash components in general, see Using Adobe ActionScript 3.0 components.

Add the controls

Now you'll add a button that lets you advance to the next cue point, and a text input control that lets you specify a spoken word to search for:

  1. From the User Interface section of the Components panel, drag a Button instance onto the Stage below the FLVPlayback component and toward the left edge of the Stage.
  2. In the Property inspector, change <Instance Name> to my_button.
  3. In the Component inspector, change the Value of the label parameter from Label to Next Cue Point.
  4. Adjust the position of the button on the Stage, if necessary, to accommodate its new width.
  5. From the User Interface section of the Components panel, drag a TextInput instance onto the Stage and position it below the FLVPlayback component and toward the middle of the Stage.
  6. In the Property inspector, change <Instance Name> to my_text.
  7. If the Toolbar panel is not visible, choose Window > Tools.
  8. Choose the Text tool.
  9. In the Character section of the Property inspector, change the color to black (if necessary).
  10. Select a sans-serif font (like Arial).
  11. Set the Size to 13.0 pt.
  12. Click the Stage between the button and the text input controls, and type Search For Word:
  13. Choose the Selection Tool from the tool bar and reposition the text if necessary. Use the arrow keys on the keyboard, if necessary, to get it positioned just to the left of the text-input control (see Figure 32).

For more information about the Button and TextInput components, see Use the Button component and Use the TextInput component in the documentation.

Add ActionScript code

Now it's time to add the code that connects all the components together. It's only a small bit of code, but it does a lot behind the scenes:

  1. If the Timeline panel is not visible, choose Window > Timeline.
  2. In the Timeline, select Layer 1.
  3. If the Actions panel is not visible, choose Window > Actions.
  4. If necessary, expand the horizontal size of the Actions panel so that you can see the ActionScript code area on the right (which should be empty at this point).
  5. Copy the following ActionScript code:
//******************************* // import necessary video classes // import fl.video.*; //****************************************** // function that runs when button is clicked // function buttonSeek(event:MouseEvent):void { my_video.seekToNextNavCuePoint(); } //**************************************** // function that runs when text is entered // function textSeek(evt_obj:Event) { my_video.seekToNavCuePoint(my_text.text.toLowerCase()); } //********************************************** // add an event listener to the video player to // call function buttonSeek when button is clicked // my_button.addEventListener(MouseEvent.CLICK, buttonSeek); //********************************************** // add an event listener to the video player to // call function textSeek when text is entered // my_text.addEventListener("enter", textSeek);
  1. Click in the ActionScript code area of the Actions panel and paste in the code.

For more information about the ActionScript elements used in the previous code, see Programming Adobe ActionScript 3.0 for Adobe Flash and the ActionScript 3.0 Language and Components Reference.

Test the movie and controls

This is where you get to see the results of all your hard work. Test your movie to demonstrate that you can position it at a particular word and begin playback from there:

  1. Choose Control > Test Movie. Flash will create a SWF file from your project and play it.
  2. Type a word from the transcribed speech (produce is a good choice) into the Search For Word text input area and press Enter.
  3. Observe that the time indicator has moved.
  4. Click the play button.
  5. Observe that the video starts playing at the word you specified.
  6. Pause the video and drag the time indicator back to the starting position on the left.
  7. Click the Next Cue Point button and observe that the time indicator moves to the first transcribed word.
  8. Experiment with the controls until you are satisfied that everything works.
  9. When you've finished testing the controls, close the movie window.
  10. Choose File > Save.
  11. Navigate to a folder where you want to save your Flash project, enter a name for your project, and click Save.
  12. Exit Flash.

Where to go from here

Congratulations! You've completed a journey where you've seen many ways in which you can make metadata work for you and how it might simplify your workflow. You've seen how it's seamlessly integrated throughout Creative Suite Production Premium and how you can use it to locate, categorize, and tag your project assets. In the case of Speech Search, you've seen how metadata allows you to do things that were not possible before. Although this tutorial has provided only a brief examination of what is possible with metadata, hopefully you've seen enough that it will encourage you to take advantage of these amazing tools.

As Adobe develops additional technologies and instructional materials to help you to take advantage of XMP metadata, these resources will be posted to the XMP metadata website. Be sure to check back periodically for more information about XMP metadata.

For information about using XMP metadata in each application in Adobe Creative Suite 4 Production Premium, see the respective Help documents:

Adobe also provides several video instructional tutorials on Adobe TV and the Adobe Video Workshop about XMP metadata, markers, and cue points: