export_frame
Export a specific frame from a Premiere Pro sequence as an image file in formats like PNG, JPG, or TIFF by specifying the sequence ID, timestamp, and output path.
Instructions
Exports a single frame from a sequence as an image file.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | The image format | |
| outputPath | Yes | The absolute path where the image file will be saved | |
| sequenceId | Yes | The ID of the sequence | |
| time | Yes | The time in seconds to export the frame from |
Implementation Reference
- src/tools/index.ts:1774-1805 (handler)The main handler method for the 'export_frame' tool. It constructs and executes an ExtendScript command via the PremiereProBridge to export a single frame from the specified sequence at the given time to the output path in the desired format.private async exportFrame(sequenceId: string, time: number, outputPath: string, format = 'png'): Promise<any> { const script = ` try { var sequence = app.project.getSequenceByID("${sequenceId}"); if (!sequence) { JSON.stringify({ success: false, error: "Sequence not found" }); return; } sequence.exportFrame(new Time("${time}s"), "${outputPath}", "${format}"); JSON.stringify({ success: true, message: "Frame exported successfully", sequenceId: "${sequenceId}", time: ${time}, outputPath: "${outputPath}", format: "${format}" }); } catch (e) { JSON.stringify({ success: false, error: e.toString() }); } `; return await this.bridge.executeScript(script); }
- src/tools/index.ts:340-348 (schema)The input schema definition (using Zod) and tool metadata for 'export_frame' in the getAvailableTools() method, which is used for MCP tool discovery and validation.name: 'export_frame', description: 'Exports a single frame from a sequence as an image file.', inputSchema: z.object({ sequenceId: z.string().describe('The ID of the sequence'), time: z.number().describe('The time in seconds to export the frame from'), outputPath: z.string().describe('The absolute path where the image file will be saved'), format: z.enum(['png', 'jpg', 'tiff']).optional().describe('The image format') }) },
- src/tools/index.ts:507-508 (registration)The switch statement case in the executeTool method that registers and dispatches 'export_frame' tool calls to the corresponding handler.return await this.exportFrame(args.sequenceId, args.time, args.outputPath, args.format);