Contents

runTranscode(for:start:duration:toFile:startTimeCode:)

Encodes the source media files to an output format based on the encoder settings.

Declaration

func runTranscode(for decoder: CompressorMediaDecoderPtr!, start startFrame: Int64, duration numFrames: Int64, toFile file: URL!, startTimeCode timeCodeDictionary: [AnyHashable : Any]!)

Parameters

  • decoder:

    A pointer to the decoder interface object.

  • startFrame:

    The frame at which to start encoding.

  • numFrames:

    The number of frames to encode.

  • file:

    The destination file URL to put the encoded file into.

  • timeCodeDictionary:

    A dictionary that contains timecode information about the source media. This dictionary has the following keys:

    hours, minutes, seconds, frames

    Integer

    frameRate

    Double

    isDrop

    Bool

    reelName

    NSString

Discussion

The Compressor app invokes this method to run an encoding job. Implement this method to transcode media files from the source format into an output format your extension supports. Inside the implementation, call the decoder interface methods to get individual video frames and audio samples to encode.

See Also

Encoding and Merging Segments