speed_change
Adjust video clip playback speed in Adobe Premiere Pro by specifying speed multipliers and audio pitch preservation options.
Instructions
Changes the playback speed of a clip.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clipId | Yes | The ID of the clip | |
| speed | Yes | Speed multiplier (0.1 = 10% speed, 2.0 = 200% speed) | |
| maintainAudio | No | Whether to maintain audio pitch when changing speed |
Implementation Reference
- src/tools/index.ts:1981-2017 (handler)The core handler function for the 'speed_change' MCP tool. It generates and executes an ExtendScript that changes the playback speed of a clip in Adobe Premiere Pro, optionally preserving audio pitch by setting maintainAudioPitch.private async speedChange(clipId: string, speed: number, maintainAudio = true): Promise<any> { const script = ` try { var clip = app.project.getClipByID("${clipId}"); if (!clip) { JSON.stringify({ success: false, error: "Clip not found" }); return; } var oldSpeed = clip.speed; clip.speed = ${speed}; if (${maintainAudio} && clip.hasAudio && clip.hasAudio()) { clip.maintainAudioPitch = true; } JSON.stringify({ success: true, message: "Speed change applied successfully", clipId: "${clipId}", oldSpeed: oldSpeed, newSpeed: ${speed}, maintainAudio: ${maintainAudio} }); } catch (e) { JSON.stringify({ success: false, error: e.toString() }); } `; return await this.bridge.executeScript(script); }
- src/tools/index.ts:389-396 (schema)Zod input schema definition for the 'speed_change' tool, defining parameters: clipId (string), speed (number), and optional maintainAudio (boolean). Used for validation and MCP tool discovery.name: 'speed_change', description: 'Changes the playback speed of a clip.', inputSchema: z.object({ clipId: z.string().describe('The ID of the clip'), speed: z.number().describe('Speed multiplier (0.1 = 10% speed, 2.0 = 200% speed)'), maintainAudio: z.boolean().optional().describe('Whether to maintain audio pitch when changing speed') }) }
- src/tools/index.ts:518-519 (registration)Registration/dispatch point in executeTool switch statement that routes 'speed_change' tool calls to the speedChange handler method.case 'speed_change': return await this.speedChange(args.clipId, args.speed, args.maintainAudio);