Microsoft DirectX 9.0

Converting Cutlists to Timelines

This article describes how to convert an existing cutlist application to Microsoft® DirectShow® Editing Services (DES).

Cutlists were a feature in earlier versions of DirectShow that provided limited support for non-linear editing. As of Microsoft® DirectX® 8.0, cutlists are no longer supported. A feature-for-feature conversion to DES should be straightforward to implement. At the very least, you will see the following benefits:

Moving beyond cutlists, you can add features such as project persistence, compositing of multiple tracks, effects, transitions, and poster frames.

A typical cutlist application performs the following steps:

  1. Create separate cutlists for the video and audio streams (IStandardCutList).
  2. For each source file, create a video file clip, audio file clip, or both (IFileClip).
  3. From each file clip, create one or more cuts (IAMCutListElement). Add them to the cutlists.
  4. Create a cutlist graph builder (ICutListGraphBuilder).
  5. Add each cutlist to the cutlist graph builder.
  6. Optionally, set the output file name.
  7. Render and play the graph.

The equivalent steps in DES are:

  1. Create a timeline (IAMTimeline).
  2. For each video and audio stream in the final production, create one group (IAMTimelineGroup).
  3. Add one or more tracks (IAMTimelineTrack) to each group.
  4. Create source objects (IAMTimelineSrc) and add them to the tracks.
  5. Create a render engine (IRenderEngine).
  6. Add the timeline to the render engine.
  7. Render and play the graph.

To highlight some of the differences:

File clips: In DES, there is no object equivalent to the file clip. A source object is roughly equivalent to a cut. As with cuts, more than one source object can refer to the same source file.

Media type: With cutlists, there are two distinct file-clip objects for audio and video. Each has its own CLSID. In DES, the group's media type determines the source object's media type.

File output: There is no direct equivalent in DES to the ICutListGraphBuilder::SetOutputFileName method. File output is somewhat more complicated in DES. However, you gain a great deal of control over the format and compression type. For more information, see Writing a Project to a File.

Modifying projects: With cutlists, you can add new cuts, but you cannot modify or remove cuts. With DES, you can add, remove, rearrange, or modify source objects. For more information, see Managing Video Editing Projects.