Quantum

SegmentExporter.doExport() – segment-based export

The “advanced” or “segment-based” exporter works by splitting the clip being transcoded into separate segments which are rendered separately and then combined into the final output movie.

SegmentExporter.doExport() uses a Deconstructor to split the clip and create a list of VideoSegment’s and AudioSegment’s as follows:

· Video and audio are rendered separately, even if we’re going from a single source file to a single output file

· For an OpAtom metaclip (eg. P2 or Avid) the video and audio are in separate source files, each of which results in a separate segment

· For spanned metaclips each file of the span results in a separate segment

· For sequences each ClipUsage (that define where a source clip is used in a track) results in a separate segment

· Any gaps in the sequence result in blank ‘filler’ segments

· If we are burning in marker text then whenever the marker changes we start a new segment (as each segment has the same burnt in text for its entire duration; the exception is burnt-in timecode which increments automatically)

SegmentExporter.transcode() takes the list of video and audio segments and does a bit of housekeeping (dumping the segments to the debug log, checking whether the destination file exists, generating a temporary directory for the transcode, then cleaning it up afterwards) before calling SegmentTranscoder.doTranscode() to do the actual transcode.